← Back to team overview

zorba-coders team mailing list archive

[Merge] lp:~zorba-coders/zorba/bug-1067028 into lp:zorba

 

Matthias Brantner has proposed merging lp:~zorba-coders/zorba/bug-1067028 into lp:zorba.

Commit message:
remove ZORBA_WITH_JSON flag

Requested reviews:
  Matthias Brantner (matthias-brantner)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-1067028/+merge/169585
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1067028/+merge/169585
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'CMakeConfiguration.txt'
--- CMakeConfiguration.txt	2013-02-07 17:24:36 +0000
+++ CMakeConfiguration.txt	2013-06-15 03:00:38 +0000
@@ -152,9 +152,6 @@
 SET(ZORBA_WITH_BIG_INTEGER OFF CACHE BOOL "enable arbitrary precision integers")
 MESSAGE(STATUS "ZORBA_WITH_BIG_INTEGER:               " ${ZORBA_WITH_BIG_INTEGER})
 
-SET(ZORBA_WITH_JSON ON CACHE BOOL "enable integrated JSON support")
-MESSAGE(STATUS "ZORBA_WITH_JSON:                      " ${ZORBA_WITH_JSON})
-
 SET(ZORBA_WITH_THESAURUS ON CACHE BOOL
     "enable installation of default English Wordnet thesaurus")
 MESSAGE(STATUS "ZORBA_WITH_THESAURUS:                 " ${ZORBA_WITH_THESAURUS})

=== modified file 'doc/cxx/examples/CMakeLists.txt'
--- doc/cxx/examples/CMakeLists.txt	2013-02-07 17:24:36 +0000
+++ doc/cxx/examples/CMakeLists.txt	2013-06-15 03:00:38 +0000
@@ -30,16 +30,13 @@
   callback.cpp
   binary.cpp
   module_import_check.cpp
+  jsoniq.cpp
 )
 
 IF(ZORBA_WITH_DEBUGGER)
 #  LIST(APPEND API_EXAMPLES debugger.cpp)
 ENDIF(ZORBA_WITH_DEBUGGER)
 
-IF (ZORBA_WITH_JSON)
-  LIST (APPEND API_EXAMPLES jsoniq.cpp)
-ENDIF (ZORBA_WITH_JSON)
-
 CREATE_TEST_SOURCELIST(
   examples
   examples.cpp

=== modified file 'include/zorba/config.h.cmake'
--- include/zorba/config.h.cmake	2013-05-28 18:20:54 +0000
+++ include/zorba/config.h.cmake	2013-06-15 03:00:38 +0000
@@ -186,7 +186,6 @@
 #cmakedefine ZORBA_WITH_BIG_INTEGER
 #cmakedefine ZORBA_WITH_DEBUGGER
 #cmakedefine ZORBA_WITH_FILE_ACCESS
-#cmakedefine ZORBA_WITH_JSON
 #cmakedefine ZORBA_WITH_LIBXML2_SAX
 
 // Zorba parser configuration

=== modified file 'include/zorba/error.h'
--- include/zorba/error.h	2013-06-04 00:34:52 +0000
+++ include/zorba/error.h	2013-06-15 03:00:38 +0000
@@ -42,12 +42,10 @@
  */
 typedef internal::SystemDiagnostic<internal::ZorbaErrQName> ZorbaErrorCode;
 
-#ifdef ZORBA_WITH_JSON
 /**
  * An %JSONiqErrorCode is a diagnostic for all JSONiq-specific errors.
  */
 typedef internal::SystemDiagnostic<internal::JSONiqErrQName> JSONiqErrorCode;
-#endif
 
 ///////////////////////////////////////////////////////////////////////////////
 

=== modified file 'include/zorba/identtypes.h'
--- include/zorba/identtypes.h	2013-03-05 12:34:19 +0000
+++ include/zorba/identtypes.h	2013-06-15 03:00:38 +0000
@@ -37,11 +37,9 @@
     NAMESPACE_TYPE,
     ANY_NODE_TYPE,          // node()
     STRUCTURED_ITEM_TYPE,   // structured-item
-#ifdef ZORBA_WITH_JSON
     JSON_ITEM_TYPE,
     JSON_OBJECT_TYPE,
     JSON_ARRAY_TYPE,
-#endif
     ITEM_TYPE,              // item()
     EMPTY_TYPE,             // empty-sequence()
     SCHEMA_ELEMENT_TYPE,

=== modified file 'include/zorba/internal/qname.h'
--- include/zorba/internal/qname.h	2013-06-04 00:34:52 +0000
+++ include/zorba/internal/qname.h	2013-06-15 03:00:38 +0000
@@ -168,8 +168,6 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
-#ifdef ZORBA_WITH_JSON
-
 /**
  * An %JSONiqErrQName is-a FixedQName for standard JSONiq errors.
  */
@@ -196,8 +194,6 @@
   zorba::diagnostic::kind kind() const;
 };
 
-#endif
-
 ///////////////////////////////////////////////////////////////////////////////
 
 /**

=== modified file 'include/zorba/item.h'
--- include/zorba/item.h	2013-02-26 04:12:43 +0000
+++ include/zorba/item.h	2013-06-15 03:00:38 +0000
@@ -147,8 +147,6 @@
   Item
   getType() const;
 
-#ifdef ZORBA_WITH_JSON
-
   /**
    * \brief Check if the Item is a JSON Item, that is, part of the JSONiq
    * data model.
@@ -160,8 +158,6 @@
   bool
   isJSONItem() const;
 
-#endif /* ZORBA_WITH_JSON */
-
   /** \brief Get the atomization value of the Item.
    *
    * The atomization value is the value that is returned by atomization 
@@ -366,8 +362,6 @@
   int
   getNodeKind() const;
 
-#ifdef ZORBA_WITH_JSON
-
   /** \brief Get the kind of this (JSON) Item.
    *
    * Note that this function is only available for JSON Items, that is, Items
@@ -421,8 +415,6 @@
   Item
   getObjectValue(String aName) const;
 
-#endif /* ZORBA_WITH_JSON */
-
   /**
    * Checks whether the item's content is streamable.
    *

=== modified file 'include/zorba/item_factory.h'
--- include/zorba/item_factory.h	2013-05-22 02:22:35 +0000
+++ include/zorba/item_factory.h	2013-06-15 03:00:38 +0000
@@ -763,8 +763,6 @@
        */
       virtual Item createUntypedAtomic(const String& value) = 0;
 
-#ifdef ZORBA_WITH_JSON
-
       /**
        * Create a JSON null item.
        */
@@ -795,8 +793,6 @@
        */
       virtual Item createJSONArray(std::vector<Item>& aItems) = 0;
 
-#endif /* ZORBA_WITH_JSON */
-
       /**
       * @brief Assigns a simple typed value to an element node.
       *

=== modified file 'include/zorba/options.h'
--- include/zorba/options.h	2013-05-28 00:01:01 +0000
+++ include/zorba/options.h	2013-06-15 03:00:38 +0000
@@ -84,10 +84,8 @@
   ZORBA_SERIALIZATION_METHOD_XHTML,
   ZORBA_SERIALIZATION_METHOD_TEXT,
   ZORBA_SERIALIZATION_METHOD_BINARY,
-#ifdef ZORBA_WITH_JSON
   ZORBA_SERIALIZATION_METHOD_JSON,
   ZORBA_SERIALIZATION_METHOD_JSON_XML_HYBRID
-#endif
 } Zorba_serialization_method_t;
 
 
@@ -189,10 +187,8 @@
   zorba::String                 cdata_section_elements;
   zorba::String                 version;
 
-#ifdef ZORBA_WITH_JSON
   Zorba_jsoniq_multiple_items_t jsoniq_multiple_items;
   Zorba_serialization_method_t  jsoniq_xdm_method;
-#endif /* ZORBA_WITH_JSON */
 
   /** \brief Default constructor for SerializerOptions which assigns default values to all
    *         options (C++ only).

=== modified file 'include/zorba/pregenerated/diagnostic_list.h'
--- include/zorba/pregenerated/diagnostic_list.h	2013-05-10 07:54:13 +0000
+++ include/zorba/pregenerated/diagnostic_list.h	2013-06-15 03:00:38 +0000
@@ -892,7 +892,6 @@
 
 namespace jerr {
 
-#if defined(ZORBA_WITH_JSON)
 extern ZORBA_DLL_PUBLIC JSONiqErrorCode JNTY0002;
 
 extern ZORBA_DLL_PUBLIC JSONiqErrorCode JNDY0003;
@@ -938,7 +937,6 @@
 extern ZORBA_DLL_PUBLIC JSONiqErrorCode JNTY0021;
 
 extern ZORBA_DLL_PUBLIC JSONiqErrorCode JNDY0021;
-#endif
 
 } // namespace jerr
 

=== modified file 'include/zorba/typeident.h'
--- include/zorba/typeident.h	2013-03-05 12:34:19 +0000
+++ include/zorba/typeident.h	2013-06-15 03:00:38 +0000
@@ -86,7 +86,6 @@
   static TypeIdentifier_t
   createStructuredItemType(IdentTypes::quantifier_t q = IdentTypes::QUANT_ONE);
 
-#ifdef ZORBA_WITH_JSON
   static TypeIdentifier_t
   createJSONItemType(IdentTypes::quantifier_t q = IdentTypes::QUANT_ONE);
 
@@ -95,7 +94,6 @@
 
   static TypeIdentifier_t
   createJSONArrayType(IdentTypes::quantifier_t q = IdentTypes::QUANT_ONE);
-#endif
 
   static TypeIdentifier_t
   createItemType(IdentTypes::quantifier_t q = IdentTypes::QUANT_ONE);

=== modified file 'modules/org/jsoniq/www/CMakeLists.txt'
--- modules/org/jsoniq/www/CMakeLists.txt	2013-02-07 17:24:36 +0000
+++ modules/org/jsoniq/www/CMakeLists.txt	2013-06-15 03:00:38 +0000
@@ -12,12 +12,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-IF(ZORBA_WITH_JSON)
-  DECLARE_ZORBA_MODULE(FILE functions.xq VERSION 1.0
-    URI "http://jsoniq.org/functions";)
-  DECLARE_ZORBA_MODULE(FILE function-library.xq VERSION 1.0
-    URI "http://jsoniq.org/function-library";)
-  DECLARE_ZORBA_MODULE (FILE pregenerated/errors.xq
-    URI "http://jsoniq.org/errors";)
-ENDIF(ZORBA_WITH_JSON)
-
+DECLARE_ZORBA_MODULE(FILE functions.xq VERSION 1.0
+  URI "http://jsoniq.org/functions";)
+DECLARE_ZORBA_MODULE(FILE function-library.xq VERSION 1.0
+  URI "http://jsoniq.org/function-library";)
+DECLARE_ZORBA_MODULE (FILE pregenerated/errors.xq
+  URI "http://jsoniq.org/errors";)

=== modified file 'modules/org/jsoniq/www/function-library.xq'
--- modules/org/jsoniq/www/function-library.xq	2013-02-07 17:24:36 +0000
+++ modules/org/jsoniq/www/function-library.xq	2013-06-15 03:00:38 +0000
@@ -26,9 +26,6 @@
  :
  : for details.
  :
- : This module depends on having the JSONiq feature enabled in Zorba,
- : i.e., Zorba must be compiled with ZORBA_WITH_JSON.
- :
  : @author Ghislain Fourny
  :)
 module namespace libjn = "http://jsoniq.org/function-library";;
@@ -171,4 +168,4 @@
 {
   for $k in jn:keys($i)
   return $i($k)
-};
\ No newline at end of file
+};

=== modified file 'modules/org/jsoniq/www/functions.xq'
--- modules/org/jsoniq/www/functions.xq	2013-06-08 05:33:57 +0000
+++ modules/org/jsoniq/www/functions.xq	2013-06-15 03:00:38 +0000
@@ -26,9 +26,6 @@
  :
  : for details.
  :
- : This module depends on having the JSONiq feature enabled in Zorba,
- : i.e., Zorba must be compiled with ZORBA_WITH_JSON.
- :
  : @author Markos Zaharioudakis, Matthias Brantner, Ghislain Fourny
  :)
 module namespace jn = "http://jsoniq.org/functions";;

=== modified file 'src/api/item.cpp'
--- src/api/item.cpp	2013-06-05 00:37:35 +0000
+++ src/api/item.cpp	2013-06-15 03:00:38 +0000
@@ -484,8 +484,6 @@
   return -1;
 }
 
-#ifdef ZORBA_WITH_JSON
-
 store::StoreConsts::JSONItemKind
 Item::getJSONItemKind() const
 {
@@ -551,7 +549,6 @@
   return Item();
 }
 
-#endif /* ZORBA_WITH_JSON */
 
 bool
 Item::isStreamable() const

=== modified file 'src/api/itemfactoryimpl.cpp'
--- src/api/itemfactoryimpl.cpp	2013-05-22 02:22:35 +0000
+++ src/api/itemfactoryimpl.cpp	2013-06-15 03:00:38 +0000
@@ -953,8 +953,6 @@
   return &*lItem;
 }
 
-#ifdef ZORBA_WITH_JSON
-
 zorba::Item ItemFactoryImpl::createJSONNull()
 {
   store::Item_t lItem;
@@ -1023,8 +1021,6 @@
   return &*lItem;
 }
 
-#endif /* ZORBA_WITH_JSON */
-
 zorba::Item ItemFactoryImpl::createUserTypedAtomicItem(
     Item& aBaseItem,
     Item& aTypeName)

=== modified file 'src/api/itemfactoryimpl.h'
--- src/api/itemfactoryimpl.h	2013-05-22 02:22:35 +0000
+++ src/api/itemfactoryimpl.h	2013-06-15 03:00:38 +0000
@@ -288,7 +288,6 @@
       virtual Item
       createUntypedAtomic(const String& value);
 
-#ifdef ZORBA_WITH_JSON
       virtual Item
       createJSONNull();
 
@@ -301,8 +300,6 @@
       virtual Item
       createJSONArray(std::vector<Item>& aItems);
 
-#endif /* ZORBA_WITH_JSON */
-
       virtual Item
       createUserTypedAtomicItem(Item& aBaseItem, Item& aTypeName);
 

=== modified file 'src/api/options.cpp'
--- src/api/options.cpp	2013-03-21 23:41:00 +0000
+++ src/api/options.cpp	2013-06-15 03:00:38 +0000
@@ -37,11 +37,7 @@
 
 Zorba_SerializerOptions::Zorba_SerializerOptions()
   :
-#ifdef ZORBA_WITH_JSON
   ser_method(ZORBA_SERIALIZATION_METHOD_JSON_XML_HYBRID),
-#else
-  ser_method(ZORBA_SERIALIZATION_METHOD_XML),
-#endif
   byte_order_mark(ZORBA_BYTE_ORDER_MARK_NO),
   escape_uri_attributes(ZORBA_ESCAPE_URI_ATTRIBUTES_NO),
   include_content_type(ZORBA_INCLUDE_CONTENT_TYPE_NO),
@@ -50,12 +46,9 @@
   omit_xml_declaration(ZORBA_OMIT_XML_DECLARATION_NO),
   standalone(ZORBA_STANDALONE_OMIT),
   undeclare_prefixes(ZORBA_UNDECLARE_PREFIXES_NO),
-  encoding(ZORBA_ENCODING_UTF8)
-#ifdef ZORBA_WITH_JSON
-  ,
-    jsoniq_multiple_items(JSONIQ_MULTIPLE_ITEMS_YES),
-    jsoniq_xdm_method(ZORBA_SERIALIZATION_METHOD_XML)
-#endif /* ZORBA_WITH_JSON */
+  encoding(ZORBA_ENCODING_UTF8),
+  jsoniq_multiple_items(JSONIQ_MULTIPLE_ITEMS_YES),
+  jsoniq_xdm_method(ZORBA_SERIALIZATION_METHOD_XML)
 {
 }
 
@@ -66,10 +59,8 @@
   else if (strcmp(value, "xhtml") == 0) return ZORBA_SERIALIZATION_METHOD_XHTML;
   else if (strcmp(value, "text") == 0) return ZORBA_SERIALIZATION_METHOD_TEXT;
   else if (strcmp(value, "binary") == 0) return ZORBA_SERIALIZATION_METHOD_BINARY;
-#ifdef ZORBA_WITH_JSON
   else if (strcmp(value, "json") == 0) return ZORBA_SERIALIZATION_METHOD_JSON;
   else if (strcmp(value, "json-xml-hybrid") == 0) return ZORBA_SERIALIZATION_METHOD_JSON_XML_HYBRID;
-#endif
   else
   {
     throw XQUERY_EXCEPTION
@@ -146,7 +137,6 @@
   {
     version = value;
   }
-#ifdef ZORBA_WITH_JSON
   else if (strcmp(parameter, "jsoniq-multiple-items") == 0)
   {
     if (strcmp(value, "no") == 0)
@@ -158,7 +148,6 @@
   {
     jsoniq_xdm_method = convertMethodString(value, parameter);
   }
-#endif /* ZORBA_WITH_JSON */
 }
 
 

=== modified file 'src/api/serialization/serializer.cpp'
--- src/api/serialization/serializer.cpp	2013-06-11 23:38:49 +0000
+++ src/api/serialization/serializer.cpp	2013-06-15 03:00:38 +0000
@@ -954,8 +954,6 @@
 }
 
 
-#ifdef ZORBA_WITH_JSON
-
 ////////////////////////////////////////////////////////////////////////////////
 //                                                                            //
 //  JSON emitter - as defined by JSONiq spec                             //
@@ -1234,8 +1232,6 @@
   emit_json_string(xml);
 }
 
-#endif /* ZORBA_WITH_JSON */
-
 ////////////////////////////////////////////////////////////////////////////////
 //                                                                            //
 //  HTML Emitter                                                              //
@@ -2083,13 +2079,11 @@
 ********************************************************************************/
 void serializer::text_emitter::emit_item(store::Item* item)
 {
-#ifdef ZORBA_WITH_JSON
   if (item->isJSONItem())
   {
     throw ZORBA_EXCEPTION(jerr::JNSE0022,
     ERROR_PARAMS("text", item->getType()->getStringValue()));
   }
-#endif
 
   if (item->isAtomic())
   {
@@ -2209,7 +2203,6 @@
 ********************************************************************************/
 void serializer::binary_emitter::emit_item(store::Item* item)
 {
-#ifdef ZORBA_WITH_JSON
   if (item->isJSONItem())
   {
     throw ZORBA_EXCEPTION(
@@ -2217,7 +2210,7 @@
         ERROR_PARAMS("binary", item->getType()->getStringValue())
       );
   }
-#endif
+
   if (item->isStreamable())
   {
     std::istream& stream = item->getStream();
@@ -2312,13 +2305,9 @@
   media_type.clear();
 
   // This default should match the default for ser_method in Zorba_SerializerOptions
-#ifdef ZORBA_WITH_JSON
   method = PARAMETER_VALUE_JSON_XML_HYBRID;
   jsoniq_multiple_items = PARAMETER_VALUE_YES;
   jsoniq_xdm_method = PARAMETER_VALUE_XML;
-#else
-  method = PARAMETER_VALUE_XML;
-#endif
 
   normalization_form.clear();
 
@@ -2347,12 +2336,10 @@
     return serializer::PARAMETER_VALUE_TEXT;
   else if (!strcmp(aValue, "binary"))
     return serializer::PARAMETER_VALUE_BINARY;
-#ifdef ZORBA_WITH_JSON
   else if (!strcmp(aValue, "json"))
     return serializer::PARAMETER_VALUE_JSON;
   else if (!strcmp(aValue, "json-xml-hybrid"))
     return serializer::PARAMETER_VALUE_JSON_XML_HYBRID;
-#endif
   else
     throw XQUERY_EXCEPTION(
         err::SEPM0016, ERROR_PARAMS( aValue, aName, ZED( GoodValuesAreXMLEtc ) )
@@ -2480,7 +2467,6 @@
   {
     cdata_section_elements = aValue;
   }
-#ifdef ZORBA_WITH_JSON
   else if (!strcmp(aName, "jsoniq-multiple-items"))
   {
     if (!strcmp(aValue, "no"))
@@ -2496,7 +2482,6 @@
   {
     jsoniq_xdm_method = convertMethodString(aValue, aName);
   }
-#endif /* ZORBA_WITH_JSON */
   else
   {
     throw XQUERY_EXCEPTION( err::SEPM0016, ERROR_PARAMS( aValue, aName ) );
@@ -2516,10 +2501,8 @@
     case PARAMETER_VALUE_XHTML: m = "xhtml"; break;
     case PARAMETER_VALUE_TEXT: m = "text"; break;
     case PARAMETER_VALUE_BINARY: m = "binary"; break;
-#ifdef ZORBA_WITH_JSON
     case PARAMETER_VALUE_JSON: m = "json"; break;
     case PARAMETER_VALUE_JSON_XML_HYBRID: m = "json-xml-hybrid"; break;
-#endif
     default: ZORBA_ASSERT(false);
   }
 }
@@ -2608,12 +2591,10 @@
     e = new text_emitter(this, *tr);
   else if (method == PARAMETER_VALUE_BINARY)
     e = new binary_emitter(this, *tr);
-#ifdef ZORBA_WITH_JSON
   else if (method == PARAMETER_VALUE_JSON)
     e = new json_emitter(this, *tr);
   else if (method == PARAMETER_VALUE_JSON_XML_HYBRID)
     e = new hybrid_emitter(this, *tr, aEmitAttributes);
-#endif
   else
   {
     ZORBA_ASSERT(0);
@@ -2691,9 +2672,7 @@
       // will certainly get errors if you attempt to serialize JDM this way.
       if (method != PARAMETER_VALUE_XML &&
           method != PARAMETER_VALUE_XHTML
-#ifdef ZORBA_WITH_JSON
           && method != PARAMETER_VALUE_JSON_XML_HYBRID
-#endif
         ) {
         throw ZORBA_EXCEPTION(
           zerr::ZAPI0070_INVALID_SERIALIZATION_METHOD_FOR_SAX,

=== modified file 'src/api/serialization/serializer.h'
--- src/api/serialization/serializer.h	2013-02-26 04:12:43 +0000
+++ src/api/serialization/serializer.h	2013-06-15 03:00:38 +0000
@@ -68,10 +68,8 @@
     PARAMETER_VALUE_XHTML,
     PARAMETER_VALUE_TEXT,
     PARAMETER_VALUE_BINARY,
-#ifdef ZORBA_WITH_JSON
     PARAMETER_VALUE_JSON,
     PARAMETER_VALUE_JSON_XML_HYBRID,
-#endif
 
     PARAMETER_VALUE_UTF_8,
     PARAMETER_VALUE_UTF_16,
@@ -112,10 +110,8 @@
   short int version;               // "1.0"
   zstring version_string;          // this the version as a string
   short int indent;                // "yes" or "no", implemented
-#ifdef ZORBA_WITH_JSON
   short int jsoniq_multiple_items;  // "no", "yes", implemented
   short int jsoniq_xdm_method;      // A legal value for "method", implemented
-#endif /* ZORBA_WITH_JSON */
   bool version_has_default_value;  // Used during validation to set version to
                                    // "4.0" when output method is "html"
   rchandle<emitter>    e;
@@ -367,8 +363,6 @@
   //                                                       //
   ///////////////////////////////////////////////////////////
 
-#ifdef ZORBA_WITH_JSON
-
   class json_emitter : public emitter
   {
   public:
@@ -446,9 +440,6 @@
     std::stringstream* theNestedXMLStringStream;
   };
 
-#endif /* ZORBA_WITH_JSON */
-
-
 
   ///////////////////////////////////////////////////////////
   //                                                       //

=== modified file 'src/api/serializerimpl.cpp'
--- src/api/serializerimpl.cpp	2013-02-07 17:24:36 +0000
+++ src/api/serializerimpl.cpp	2013-06-15 03:00:38 +0000
@@ -99,12 +99,10 @@
     return ZORBA_SERIALIZATION_METHOD_TEXT;
   case serializer::PARAMETER_VALUE_BINARY:
     return ZORBA_SERIALIZATION_METHOD_BINARY;
-#ifdef ZORBA_WITH_JSON
   case serializer::PARAMETER_VALUE_JSON:
     return ZORBA_SERIALIZATION_METHOD_JSON;
   case serializer::PARAMETER_VALUE_JSON_XML_HYBRID:
     return ZORBA_SERIALIZATION_METHOD_JSON_XML_HYBRID;
-#endif
   default:
     ZORBA_ASSERT(0);
   }
@@ -128,12 +126,10 @@
     aInternalSerializer.setParameter(aParameter, "text"); break;
   case ZORBA_SERIALIZATION_METHOD_BINARY:
     aInternalSerializer.setParameter(aParameter, "binary"); break;
-#ifdef ZORBA_WITH_JSON
   case ZORBA_SERIALIZATION_METHOD_JSON:
     aInternalSerializer.setParameter(aParameter, "json"); break;
   case ZORBA_SERIALIZATION_METHOD_JSON_XML_HYBRID:
     aInternalSerializer.setParameter(aParameter, "json-xml-hybrid"); break;
-#endif
   }
 }
 
@@ -218,7 +214,6 @@
   if (aSerializerOptions.version != "")
     aInternalSerializer.setParameter("version", aSerializerOptions.version.c_str());
 
-#ifdef ZORBA_WITH_JSON
   switch (aSerializerOptions.jsoniq_multiple_items)
   {
     case JSONIQ_MULTIPLE_ITEMS_NO:
@@ -232,8 +227,6 @@
   convertSerializationMethod(aInternalSerializer,
                              "jsoniq-xdm-node-output-method",
                              aSerializerOptions.jsoniq_xdm_method);
-
-#endif /* ZORBA_WITH_JSON */
 }
 
 void

=== modified file 'src/api/typeidentimpl.cpp'
--- src/api/typeidentimpl.cpp	2013-03-05 12:34:19 +0000
+++ src/api/typeidentimpl.cpp	2013-06-15 03:00:38 +0000
@@ -220,8 +220,6 @@
 }
 
 
-#ifdef ZORBA_WITH_JSON
-
 TypeIdentifier_t TypeIdentifier::createJSONItemType(IdentTypes::quantifier_t q)
 {
   TypeIdentifier_t ti(new TypeIdentifier());
@@ -252,9 +250,6 @@
 }
 
 
-#endif
-
-
 TypeIdentifier_t TypeIdentifier::createItemType(IdentTypes::quantifier_t quantifier)
 {
   TypeIdentifier_t ti(new TypeIdentifier());

=== modified file 'src/compiler/codegen/plan_visitor.cpp'
--- src/compiler/codegen/plan_visitor.cpp	2013-05-08 08:01:05 +0000
+++ src/compiler/codegen/plan_visitor.cpp	2013-06-15 03:00:38 +0000
@@ -3261,8 +3261,6 @@
 }
 
 
-#ifdef ZORBA_WITH_JSON
-
 /*******************************************************************************
 
   JSON Constructors
@@ -3375,10 +3373,6 @@
 }
 
 
-
-#endif // ZORBA_WITH_JSON
-
-
 bool begin_visit(const_expr& v)
 {
   CODEGEN_TRACE_IN("");

=== modified file 'src/compiler/expression/abstract_expr_visitor.h'
--- src/compiler/expression/abstract_expr_visitor.h	2013-03-04 21:00:58 +0000
+++ src/compiler/expression/abstract_expr_visitor.h	2013-06-15 03:00:38 +0000
@@ -52,10 +52,8 @@
   EXPR_VISITOR_METHODS (elem_expr);
   EXPR_VISITOR_METHODS (pi_expr);
   EXPR_VISITOR_METHODS (text_expr);
-#ifdef ZORBA_WITH_JSON
   EXPR_VISITOR_METHODS (json_object_expr);
   EXPR_VISITOR_METHODS (json_array_expr);
-#endif
 
   EXPR_VISITOR_METHODS (expr);
   EXPR_VISITOR_METHODS (extension_expr);

=== modified file 'src/compiler/expression/expr_classes.h'
--- src/compiler/expression/expr_classes.h	2013-03-15 08:22:41 +0000
+++ src/compiler/expression/expr_classes.h	2013-06-15 03:00:38 +0000
@@ -73,10 +73,8 @@
   class function_trace_expr;
   class wrapper_expr;
 
-#ifdef ZORBA_WITH_JSON
   class json_direct_object_expr;
   class json_object_expr;
   class json_array_expr;
-#endif
 }
 /* vim:set et sw=2 ts=2: */

=== modified file 'src/compiler/expression/expr_clone.cpp'
--- src/compiler/expression/expr_clone.cpp	2013-05-24 16:34:11 +0000
+++ src/compiler/expression/expr_clone.cpp	2013-06-15 03:00:38 +0000
@@ -153,7 +153,6 @@
                    CLONE(e->get_content_expr(), udf, subst));
     break;
   }
-#ifdef ZORBA_WITH_JSON
   case json_direct_object_expr_kind:
   {
     const json_direct_object_expr* e = static_cast<const json_direct_object_expr*>(this);
@@ -210,7 +209,6 @@
 
     break;
   }
-#endif
 
   case relpath_expr_kind:
   {

=== modified file 'src/compiler/expression/expr_iter.cpp'
--- src/compiler/expression/expr_iter.cpp	2013-05-24 16:34:11 +0000
+++ src/compiler/expression/expr_iter.cpp	2013-06-15 03:00:38 +0000
@@ -601,7 +601,6 @@
     return;
   }
 
-#ifdef ZORBA_WITH_JSON
   case json_array_expr_kind:
   {
     json_array_expr* e = static_cast<json_array_expr*>(theExpr);
@@ -652,8 +651,6 @@
     return;
   }
 
-#endif
-
   case if_expr_kind:
   {
     if_expr* ifExpr = static_cast<if_expr*>(theExpr);

=== modified file 'src/compiler/expression/expr_manager.cpp'
--- src/compiler/expression/expr_manager.cpp	2013-05-24 16:34:11 +0000
+++ src/compiler/expression/expr_manager.cpp	2013-06-15 03:00:38 +0000
@@ -569,8 +569,6 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 
-#ifdef ZORBA_WITH_JSON
-
 json_array_expr* ExprManager::create_json_array_expr(
     static_context* sctx,
     user_function* udf,
@@ -603,8 +601,6 @@
 }
 
 
-#endif // ZORBA_WITH_JSON
-
 ////////////////////////////////////////////////////////////////////////////////
 
 

=== modified file 'src/compiler/expression/expr_put.cpp'
--- src/compiler/expression/expr_put.cpp	2013-04-24 01:35:58 +0000
+++ src/compiler/expression/expr_put.cpp	2013-06-15 03:00:38 +0000
@@ -870,7 +870,6 @@
 }
 
 
-#ifdef ZORBA_WITH_JSON
 ostream& json_array_expr::put(ostream& os) const
 {
   BEGIN_PUT(json_array_expr);
@@ -904,7 +903,6 @@
 
   END_PUT();
 }
-#endif
 
 
 ostream& insert_expr::put(ostream& os) const

=== modified file 'src/compiler/expression/expr_type.cpp'
--- src/compiler/expression/expr_type.cpp	2013-05-28 19:57:02 +0000
+++ src/compiler/expression/expr_type.cpp	2013-06-15 03:00:38 +0000
@@ -599,7 +599,6 @@
     break;
   }
 
-#ifdef ZORBA_WITH_JSON
   case json_object_expr_kind:
   case json_direct_object_expr_kind:
   {
@@ -612,7 +611,6 @@
     newType = rtm.JSON_ARRAY_TYPE_ONE;
     break;
   }
-#endif
 
   case const_expr_kind:
   {

=== modified file 'src/compiler/expression/expr_visitor.h'
--- src/compiler/expression/expr_visitor.h	2013-03-15 08:22:41 +0000
+++ src/compiler/expression/expr_visitor.h	2013-06-15 03:00:38 +0000
@@ -70,11 +70,9 @@
   DECL_EXPR_VISITOR_VISIT_MEM_FNS( text_expr );
   DECL_EXPR_VISITOR_VISIT_MEM_FNS( pi_expr );
 
-#ifdef ZORBA_WITH_JSON
   DECL_EXPR_VISITOR_VISIT_MEM_FNS( json_object_expr );
   DECL_EXPR_VISITOR_VISIT_MEM_FNS( json_direct_object_expr );
   DECL_EXPR_VISITOR_VISIT_MEM_FNS( json_array_expr );
-#endif
 
   DECL_EXPR_VISITOR_VISIT_MEM_FNS( trycatch_expr );
   DECL_EXPR_VISITOR_VISIT_MEM_FNS( function_item_expr );

=== modified file 'src/compiler/expression/json_exprs.cpp'
--- src/compiler/expression/json_exprs.cpp	2013-03-11 10:00:36 +0000
+++ src/compiler/expression/json_exprs.cpp	2013-06-15 03:00:38 +0000
@@ -18,8 +18,6 @@
 #include "compiler/expression/expr_visitor.h"
 #include "compiler/api/compilercb.h"
 
-#ifdef ZORBA_WITH_JSON
-
 namespace zorba
 {
 
@@ -171,5 +169,3 @@
 
 
 }
-#endif // ZORBA_WITH_JSON
-

=== modified file 'src/compiler/expression/json_exprs.h'
--- src/compiler/expression/json_exprs.h	2013-02-07 17:24:36 +0000
+++ src/compiler/expression/json_exprs.h	2013-06-15 03:00:38 +0000
@@ -24,8 +24,6 @@
 
 #include "compiler/expression/expr_base.h"
 
-#ifdef ZORBA_WITH_JSON
-
 
 namespace zorba
 {
@@ -145,8 +143,6 @@
 
 }
 
-#endif // ZORBA_WITH_JSON
-
 #endif
 
 /*

=== modified file 'src/compiler/rewriter/rules/nodeid_rules.cpp'
--- src/compiler/rewriter/rules/nodeid_rules.cpp	2013-05-24 16:34:11 +0000
+++ src/compiler/rewriter/rules/nodeid_rules.cpp	2013-06-15 03:00:38 +0000
@@ -785,7 +785,6 @@
     break;
   }
 
-#ifdef ZORBA_WITH_JSON
   case json_direct_object_expr_kind:
   {
     // For now, assume that nodes to appear as pair values must be copied first.
@@ -827,8 +826,6 @@
 
     break;
   }
-#endif
-
   case relpath_expr_kind:
   {
     relpath_expr* e = static_cast<relpath_expr *>(node);
@@ -1311,14 +1308,12 @@
     return;
   }
 
-#ifdef ZORBA_WITH_JSON
   case json_object_expr_kind:
   case json_direct_object_expr_kind:
   case json_array_expr_kind:
   {
     return;
   }
-#endif
 
   case relpath_expr_kind:
   {

=== modified file 'src/compiler/rewriter/rules/type_rules.cpp'
--- src/compiler/rewriter/rules/type_rules.cpp	2013-05-22 21:03:15 +0000
+++ src/compiler/rewriter/rules/type_rules.cpp	2013-06-15 03:00:38 +0000
@@ -128,7 +128,6 @@
         return NULL;
     }
 
-#ifdef ZORBA_WITH_JSON
     if (fo->get_func()->getKind() == FunctionConsts::OP_ZORBA_JSON_BOX_1)
     {
       expr* arg = fo->get_arg(0);
@@ -147,7 +146,6 @@
 
       return NULL;
     }
-#endif
 
     break;
   }

=== modified file 'src/compiler/rewriter/tools/dataflow_annotations.cpp'
--- src/compiler/rewriter/tools/dataflow_annotations.cpp	2013-05-29 04:17:01 +0000
+++ src/compiler/rewriter/tools/dataflow_annotations.cpp	2013-06-15 03:00:38 +0000
@@ -213,7 +213,6 @@
     break;
   }
 
-#ifdef ZORBA_WITH_JSON
   case json_direct_object_expr_kind:
   case json_object_expr_kind:
   case json_array_expr_kind:
@@ -222,7 +221,6 @@
     SORTED_NODES(e);
     DISTINCT_NODES(e);
   }
-#endif
 
   case dynamic_function_invocation_expr_kind: // TODO
   case argument_placeholder_expr_kind: // TODO
@@ -986,7 +984,6 @@
     return;
   }
 
-#ifdef ZORBA_WITH_JSON
   case json_direct_object_expr_kind:
   case json_object_expr_kind:
   case json_array_expr_kind:
@@ -995,7 +992,6 @@
     // if we are coming from an unbox or flatten call ????
     break;
   }
-#endif
 
   case relpath_expr_kind:
   {
@@ -1325,7 +1321,6 @@
     return;
   }
 
-#ifdef ZORBA_WITH_JSON
   case json_direct_object_expr_kind:
   case json_object_expr_kind:
   case json_array_expr_kind:
@@ -1334,7 +1329,6 @@
     // if we are coming from an unbox or flatten call ????
     break;
   }
-#endif
 
   case relpath_expr_kind:
   {

=== modified file 'src/compiler/translator/translator.cpp'
--- src/compiler/translator/translator.cpp	2013-06-11 18:13:29 +0000
+++ src/compiler/translator/translator.cpp	2013-06-15 03:00:38 +0000
@@ -9751,7 +9751,6 @@
   // terrible hack to allow for a standalone true, false or null to be
   // interpreted as a boolean. User must use ./true, ./false or ./null for
   // navigating XML elements named that way.
-#ifdef ZORBA_WITH_JSON
   if (pe_type == ParseConstants::path_relative)
   {
     RelativePathExpr* lRootRelPathExpr =
@@ -9827,7 +9826,6 @@
       }
     }
   }
-#endif
 
   relpath_expr* pathExpr = NULL;
 
@@ -15204,9 +15202,7 @@
 void* begin_visit(const JSONRenameExpr& v)
 {
   TRACE_VISIT();
-#ifndef ZORBA_WITH_JSON
   RAISE_ERROR_NO_PARAMS(err::XPST0003, loc);
-#endif
   return no_state;
 }
 
@@ -15215,7 +15211,6 @@
 {
   TRACE_VISIT_OUT();
 
-#ifdef ZORBA_WITH_JSON
   expr* newNameExpr = pop_nodestack();
   expr* nameExpr = pop_nodestack();
   expr* targetExpr = pop_nodestack();
@@ -15243,7 +15238,6 @@
                                 args);
 
   push_nodestack(updExpr);
-#endif
 }
 
 

=== modified file 'src/context/static_context.cpp'
--- src/context/static_context.cpp	2013-06-09 08:09:40 +0000
+++ src/context/static_context.cpp	2013-06-15 03:00:38 +0000
@@ -406,8 +406,6 @@
 static_context::ZORBA_STORE_DYNAMIC_UNORDERED_MAP_FN_NS =
 "http://www.zorba-xquery.com/modules/store/data-structures/unordered-map";;
 
-#ifdef ZORBA_WITH_JSON
-
 const char*
 static_context::JSONIQ_DM_NS =
 "http://jsoniq.org/types";;
@@ -416,8 +414,6 @@
 static_context::JSONIQ_FN_NS =
 "http://jsoniq.org/functions";;
 
-#endif
-
 const char*
 static_context::ZORBA_SCHEMA_FN_NS =
 "http://www.zorba-xquery.com/modules/schema";;
@@ -570,9 +566,7 @@
             ns == ZORBA_FULL_TEXT_FN_NS ||
 #endif /* ZORBA_NO_FULL_TEXT */
             ns == ZORBA_DATETIME_FN_NS ||
-#ifdef ZORBA_WITH_JSON
             ns == JSONIQ_FN_NS ||
-#endif /* ZORBA_WITH_JSON */
             ns == ZORBA_XML_FN_NS);
   }
   else if (ns == W3C_FN_NS || ns == XQUERY_MATH_FN_NS)

=== modified file 'src/context/static_context.h'
--- src/context/static_context.h	2013-06-09 08:09:40 +0000
+++ src/context/static_context.h	2013-06-15 03:00:38 +0000
@@ -532,10 +532,8 @@
   static const char* ZORBA_STORE_DYNAMIC_DOCUMENTS_FN_NS;
   static const char* ZORBA_STORE_DYNAMIC_UNORDERED_MAP_FN_NS;
 
-#ifdef ZORBA_WITH_JSON
   static const char* JSONIQ_DM_NS;
   static const char* JSONIQ_FN_NS;
-#endif
 
   static const char* ZORBA_SCHEMA_FN_NS;
   static const char* ZORBA_XQDOC_FN_NS;

=== modified file 'src/diagnostics/CMakeLists.txt'
--- src/diagnostics/CMakeLists.txt	2013-02-07 17:24:36 +0000
+++ src/diagnostics/CMakeLists.txt	2013-06-15 03:00:38 +0000
@@ -68,7 +68,6 @@
     "${CMAKE_BINARY_DIR}/src/diagnostics/dict_zed_keys.h"
 )
 
-IF(ZORBA_WITH_JSON)
 ZORBA_DIAGNOSTIC_GENERATOR(
     "${CMAKE_SOURCE_DIR}/src/diagnostics/diagnostic_list_xq.xq"
     "input=${CMAKE_SOURCE_DIR}/src/diagnostics/diagnostic_en.xml;ns:=jerr"
@@ -76,7 +75,6 @@
     ""
     "${CMAKE_BINARY_DIR}/modules/org/jsoniq/www/errors.xq"
 )
-ENDIF(ZORBA_WITH_JSON)
 
 ZORBA_DIAGNOSTIC_GENERATOR(
     "${CMAKE_SOURCE_DIR}/src/diagnostics/diagnostic_list_xq.xq"
@@ -97,12 +95,9 @@
   ${CMAKE_BINARY_DIR}/modules/com/zorba-xquery/www/modules/warnings.xq
   ${CMAKE_BINARY_DIR}/modules/com/zorba-xquery/www/modules/errors.xq
   ${CMAKE_BINARY_DIR}/modules/w3c/xqt-errors.xq
+  ${CMAKE_BINARY_DIR}/modules/org/jsoniq/www/errors.xq
 )
 
-IF(ZORBA_WITH_JSON)
-  LIST(APPEND DIAG_MODULES ${CMAKE_BINARY_DIR}/modules/org/jsoniq/www/errors.xq)
-ENDIF(ZORBA_WITH_JSON)
-
 ADD_CUSTOM_TARGET (gen_diag_modules
   DEPENDS ${DIAG_MODULES}
 )

=== modified file 'src/diagnostics/diagnostic_en.xml'
--- src/diagnostics/diagnostic_en.xml	2013-06-13 18:18:55 +0000
+++ src/diagnostics/diagnostic_en.xml	2013-06-15 03:00:38 +0000
@@ -3163,36 +3163,36 @@
 
     <!--////////// JSONiq //////////////////////////////////////////////////-->
 
-    <diagnostic code="JNTY0002" if="defined(ZORBA_WITH_JSON)">
+    <diagnostic code="JNTY0002">
       <comment>It is a type error if the right-hand-side expression of a pair constructor does not return exactly one item.</comment>
       <value>pair value returns no, or more than one, item</value>
     </diagnostic>
 
-    <diagnostic code="JNDY0003" if="defined(ZORBA_WITH_JSON)">
+    <diagnostic code="JNDY0003">
       <comment>It is a dynamic error if two pairs in an object constructor or in a simple object union have the same name.</comment>
       <value>"$1": pair with the same name already exists in object</value>
     </diagnostic>
 
-    <diagnostic code="JNTY0004" if="defined(ZORBA_WITH_JSON)">
+    <diagnostic code="JNTY0004">
       <comment>It is a type error to call fn:data on a sequence containing an array or an object.</comment>
       <value>can not atomize an $1 item: an $1 has probably been passed where an atomic value is expected (e.g., as a key, or to a function expecting an atomic item)</value>
     </diagnostic>
 
-    <diagnostic code="JNUP0005" if="defined(ZORBA_WITH_JSON)">
+    <diagnostic code="JNUP0005">
       <comment>It is a dynamic error if a pending update list contains two inserting update primitives on the same object and pair name.</comment>
 
       <value>"$1": duplicate pair to insert</value>
 
     </diagnostic>
 
-    <diagnostic code="JNUP0006" if="defined(ZORBA_WITH_JSON)">
+    <diagnostic code="JNUP0006">
       <comment>It is a dynamic error if upd:applyUpdates causes an object to contain two pairs with the same name.</comment>
 
       <value>"$1": pair to insert already exists in object</value>
 
     </diagnostic>
 
-    <diagnostic code="JNUP0007" if="defined(ZORBA_WITH_JSON)">
+    <diagnostic code="JNUP0007">
       <comment>It is a type error if, in an updating expression, an array selector cannot be cast to xs:integer or if an object selector cannot be cast to xs:string.</comment>
 
       <value>"$1": wrong type for object/array selector in update expression</value>
@@ -3211,7 +3211,7 @@
 
     </diagnostic>
 
-    <diagnostic code="JNUP0008" if="defined(ZORBA_WITH_JSON)">
+    <diagnostic code="JNUP0008">
       <comment>It is a dynamic error if the target of a deleting or replacing expression is not an array or an object.
         It is a dynamic error if the target of a renaming expression is not an object.
         It is a dynamic error if the target of an appending expression is not an array.
@@ -3234,22 +3234,22 @@
 
     </diagnostic>
 
-    <diagnostic code="JNUP0009" if="defined(ZORBA_WITH_JSON)">
+    <diagnostic code="JNUP0009">
       <comment>It is a dynamic error if a pending update list contains two replacing update primitives on the same object or array, and with the same selector.</comment>
       <value>"$1": duplicate pair to replace</value>
     </diagnostic>
 
-    <diagnostic code="JNUP0010" if="defined(ZORBA_WITH_JSON)">
+    <diagnostic code="JNUP0010">
       <comment>It is a dynamic error if a pending update list contains two renaming update primitives on the same object and with the same selector.</comment>
       <value>"$1": duplicate pair to rename</value>
     </diagnostic>
 
-    <diagnostic code="JNTY0011" if="defined(ZORBA_WITH_JSON)">
+    <diagnostic code="JNTY0011">
       <comment>It is a type error if the content sequence in a node constructor or in an XQUF insert or replace update expression contains an object or an array.</comment>
       <value>JSON item cannot appear in content sequence of node constructor or updating expression</value>
     </diagnostic>
 
-    <diagnostic code="JNSE0012" if="defined(ZORBA_WITH_JSON)">
+    <diagnostic code="JNSE0012">
       <comment>It is a dynamic error to serialize a sequence of less
       or more than one item with the JSON output method if the
       jsoniq-serialization-multiple-items is set to no.
@@ -3258,7 +3258,7 @@
       <value>can not serialize multiple top-level items as JSON</value>
     </diagnostic>
 
-    <diagnostic code="JNSE0013" if="defined(ZORBA_WITH_JSON)">
+    <diagnostic code="JNSE0013">
       <comment>It is a dynamic error to serialize an atomic value not
       supported by JSON or a node with the JSON output method and with
       the jsoniq-serialization-extensions serialization parameter
@@ -3267,20 +3267,20 @@
       <value>can not serialize value as JSON: $1</value>
     </diagnostic>
 
-    <diagnostic code="JNSE0014" if="defined(ZORBA_WITH_JSON)">
+    <diagnostic code="JNSE0014">
       <comment>It is a dynamic error to serialize a function or a node with the
       JSON output method.</comment>
       <value>can not serialize a node or function item as JSON</value>
     </diagnostic>
 
-    <diagnostic code="JNSE0022" if="defined(ZORBA_WITH_JSON)">
+    <diagnostic code="JNSE0022">
       <comment>It is a dynamic error to serialize a sequence that does
         not exist of exactly one document node with XML, HTML, XHTML, Text.
       </comment>
       <value>"$1": invalid serialization method for item type ($2)</value>
     </diagnostic>
 
-    <diagnostic code="JNUP0016" if="defined(ZORBA_WITH_JSON)">
+    <diagnostic code="JNUP0016">
       <comment>It is a dynamic error if it is attempted to create a replace, delete or rename update primitive with a selector that cannot be resolved against the target array or object.</comment>
 
       <value>$1</value>
@@ -3294,45 +3294,45 @@
       </entry>
     </diagnostic>
 
-    <diagnostic code="JNUP0017" if="defined(ZORBA_WITH_JSON)">
+    <diagnostic code="JNUP0017">
       <comment> It is a dynamic error if the value in a replace expression is not exactly a single item.</comment>
       <value>can not replace with less or more than an item</value>
     </diagnostic>
 
-    <diagnostic code="JNTY0018" if="defined(ZORBA_WITH_JSON)">
+    <diagnostic code="JNTY0018">
       <comment>It is a dynamic error if there is not exactly one supplied parameter for an object or array selector.</comment>
 
       <value>object or array selection needs zero or one parameter</value>
     </diagnostic>
 
-    <diagnostic code="JNUP0019" if="defined(ZORBA_WITH_JSON)">
+    <diagnostic code="JNUP0019">
       <comment>It is a dynamic error if the content expression, in an object insert expression, does not evaluate to a sequence of objects.</comment>
 
       <value>"$1": invalid type (content of insert expression must evaluate to a sequence of objects)</value>
     </diagnostic>
 
-    <diagnostic code="JNTY0023" if="defined(ZORBA_WITH_JSON)">
+    <diagnostic code="JNTY0023">
       <comment>It is a type error if the prefix is not a string or if the
         serialization parameters are not an element.</comment>
       <value>$1: value of "$2" is not a $3</value>
     </diagnostic>
 
-    <diagnostic code="JNTY0024" if="defined(ZORBA_WITH_JSON)">
+    <diagnostic code="JNTY0024">
       <comment>objects or arrays don't have a string value</comment>
       <value>$1 items do not have string value</value>
     </diagnostic>
 
-    <diagnostic code="JNTY0020" if="defined(ZORBA_WITH_JSON)">
+    <diagnostic code="JNTY0020">
       <comment>parser error for invalid option type</comment>
       <value>$1: invalid option type for option $2 (expected $3)</value>
     </diagnostic>
 
-    <diagnostic code="JNTY0021" if="defined(ZORBA_WITH_JSON)">
+    <diagnostic code="JNTY0021">
       <comment>array or object selector on heterogeneous sequence</comment>
       <value>$1: invalid json-item() type (expected $2)</value>
     </diagnostic>
 
-    <diagnostic code="JNDY0021" if="defined(ZORBA_WITH_JSON)">
+    <diagnostic code="JNDY0021">
       <comment>parser error raised by jn:parse-json</comment>
       <value>$1</value>
       <entry key="IllegalCharacter_2">

=== modified file 'src/diagnostics/pregenerated/diagnostic_list.cpp'
--- src/diagnostics/pregenerated/diagnostic_list.cpp	2013-05-10 07:54:13 +0000
+++ src/diagnostics/pregenerated/diagnostic_list.cpp	2013-06-15 03:00:38 +0000
@@ -1314,7 +1314,6 @@
 
 namespace jerr {
 
-#if defined(ZORBA_WITH_JSON)
 JSONiqErrorCode JNTY0002( "JNTY0002" );
 
 
@@ -1382,7 +1381,6 @@
 
 
 JSONiqErrorCode JNDY0021( "JNDY0021" );
-#endif
 
 
 } // namespace jerr

=== modified file 'src/diagnostics/pregenerated/dict_en.cpp'
--- src/diagnostics/pregenerated/dict_en.cpp	2013-06-13 18:18:55 +0000
+++ src/diagnostics/pregenerated/dict_en.cpp	2013-06-15 03:00:38 +0000
@@ -99,75 +99,29 @@
 #if !defined(ZORBA_NO_FULL_TEXT)
   { "FTST0019", "\"$1\": match option specified more than once" },
 #endif
-#if defined(ZORBA_WITH_JSON)
   { "JNDY0003", "\"$1\": pair with the same name already exists in object" },
-#endif
-#if defined(ZORBA_WITH_JSON)
   { "JNDY0021", "$1" },
-#endif
-#if defined(ZORBA_WITH_JSON)
   { "JNSE0012", "can not serialize multiple top-level items as JSON" },
-#endif
-#if defined(ZORBA_WITH_JSON)
   { "JNSE0013", "can not serialize value as JSON: $1" },
-#endif
-#if defined(ZORBA_WITH_JSON)
   { "JNSE0014", "can not serialize a node or function item as JSON" },
-#endif
-#if defined(ZORBA_WITH_JSON)
   { "JNSE0022", "\"$1\": invalid serialization method for item type ($2)" },
-#endif
-#if defined(ZORBA_WITH_JSON)
   { "JNTY0002", "pair value returns no, or more than one, item" },
-#endif
-#if defined(ZORBA_WITH_JSON)
   { "JNTY0004", "can not atomize an $1 item: an $1 has probably been passed where an atomic value is expected (e.g., as a key, or to a function expecting an atomic item)" },
-#endif
-#if defined(ZORBA_WITH_JSON)
   { "JNTY0011", "JSON item cannot appear in content sequence of node constructor or updating expression" },
-#endif
-#if defined(ZORBA_WITH_JSON)
   { "JNTY0018", "object or array selection needs zero or one parameter" },
-#endif
-#if defined(ZORBA_WITH_JSON)
   { "JNTY0020", "$1: invalid option type for option $2 (expected $3)" },
-#endif
-#if defined(ZORBA_WITH_JSON)
   { "JNTY0021", "$1: invalid json-item() type (expected $2)" },
-#endif
-#if defined(ZORBA_WITH_JSON)
   { "JNTY0023", "$1: value of \"$2\" is not a $3" },
-#endif
-#if defined(ZORBA_WITH_JSON)
   { "JNTY0024", "$1 items do not have string value" },
-#endif
-#if defined(ZORBA_WITH_JSON)
   { "JNUP0005", "\"$1\": duplicate pair to insert" },
-#endif
-#if defined(ZORBA_WITH_JSON)
   { "JNUP0006", "\"$1\": pair to insert already exists in object" },
-#endif
-#if defined(ZORBA_WITH_JSON)
   { "JNUP0007", "\"$1\": wrong type for object/array selector in update expression" },
-#endif
-#if defined(ZORBA_WITH_JSON)
   { "JNUP0008", "$1" },
-#endif
-#if defined(ZORBA_WITH_JSON)
   { "JNUP0009", "\"$1\": duplicate pair to replace" },
-#endif
-#if defined(ZORBA_WITH_JSON)
   { "JNUP0010", "\"$1\": duplicate pair to rename" },
-#endif
-#if defined(ZORBA_WITH_JSON)
   { "JNUP0016", "$1" },
-#endif
-#if defined(ZORBA_WITH_JSON)
   { "JNUP0017", "can not replace with less or more than an item" },
-#endif
-#if defined(ZORBA_WITH_JSON)
   { "JNUP0019", "\"$1\": invalid type (content of insert expression must evaluate to a sequence of objects)" },
-#endif
   { "SENR0001", "\"$1\": can not serialize $2" },
   { "SEPM0004", "doctype-system parameter, or standalone parameter with a value other than \"omit\", specified" },
   { "SEPM0009", "omit-xml-declaration parameter is \"yes\" and $1" },

=== modified file 'src/diagnostics/qname.cpp'
--- src/diagnostics/qname.cpp	2013-06-04 00:34:52 +0000
+++ src/diagnostics/qname.cpp	2013-06-15 03:00:38 +0000
@@ -48,8 +48,6 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
-#ifdef ZORBA_WITH_JSON
-
 char const JSONiqErrQName::NAMESPACE[] = JSONIQ_ERR_NS;
 char const JSONiqErrQName::PREFIX[] = "jerr";
 
@@ -68,8 +66,6 @@
   return UNKNOWN_KIND;
 }
 
-#endif
-
 ///////////////////////////////////////////////////////////////////////////////
 
 char const ZorbaErrQName::NAMESPACE[] = ZORBA_ERR_NS;

=== modified file 'src/functions/CMakeLists.txt'
--- src/functions/CMakeLists.txt	2013-03-27 00:44:34 +0000
+++ src/functions/CMakeLists.txt	2013-06-15 03:00:38 +0000
@@ -87,14 +87,9 @@
     func_parse_fragment_impl.cpp
     func_schema_impl.cpp
     func_fn_hof_functions_impl.cpp
+    func_jsoniq_functions_impl.cpp
 )
 
-IF (ZORBA_WITH_JSON)
-  LIST(APPEND FUNCTIONS_SRCS
-    func_jsoniq_functions_impl.cpp
-  )
-ENDIF (ZORBA_WITH_JSON)
-
 IF (NOT ZORBA_NO_FULL_TEXT)
   LIST(APPEND FUNCTIONS_SRCS func_ft_module_impl.cpp)
 ENDIF (NOT ZORBA_NO_FULL_TEXT)

=== modified file 'src/functions/func_jsoniq_functions_impl.h'
--- src/functions/func_jsoniq_functions_impl.h	2012-10-10 13:05:50 +0000
+++ src/functions/func_jsoniq_functions_impl.h	2013-06-15 03:00:38 +0000
@@ -25,8 +25,6 @@
 namespace zorba 
 {
 
-#ifdef ZORBA_WITH_JSON
-
 void populate_context_jsoniq_functions_impl(static_context* sctx);
 
 
@@ -50,8 +48,6 @@
 };
 
 
-#endif // ZORBA_WITH_JSON
-
 }
 
 #endif

=== modified file 'src/functions/function_consts.h'
--- src/functions/function_consts.h	2013-06-04 21:47:40 +0000
+++ src/functions/function_consts.h	2013-06-15 03:00:38 +0000
@@ -235,9 +235,7 @@
   OP_HOIST_1,
   OP_UNHOIST_1,
 
-#ifdef ZORBA_WITH_JSON
   JN_OBJECT_1,
-#endif
 
 #ifndef ZORBA_NO_FULL_TEXT
   FULL_TEXT_CURRENT_COMPARE_OPTIONS_0,

=== modified file 'src/functions/library.cpp'
--- src/functions/library.cpp	2013-03-27 00:44:34 +0000
+++ src/functions/library.cpp	2013-06-15 03:00:38 +0000
@@ -84,10 +84,8 @@
 
 #include "zorbaserialization/archiver.h"
 
-#ifdef ZORBA_WITH_JSON
 #include "functions/func_jsoniq_functions.h"
 #include "functions/func_jsoniq_functions_impl.h"
-#endif
 
 
 namespace zorba
@@ -174,10 +172,8 @@
   populate_context_ft_module_impl(sctx);
 #endif /* ZORBA_NO_FULL_TEXT */
 
-#ifdef ZORBA_WITH_JSON
   populate_context_jsoniq_functions(sctx);
   populate_context_jsoniq_functions_impl(sctx);
-#endif
 
 #ifdef PRE_SERIALIZE_BUILTIN_FUNCTIONS
   ar.set_loading_hardcoded_objects(false);

=== modified file 'src/runtime/CMakeLists.txt'
--- src/runtime/CMakeLists.txt	2013-04-04 04:06:57 +0000
+++ src/runtime/CMakeLists.txt	2013-06-15 03:00:38 +0000
@@ -148,6 +148,8 @@
   collections/collections_base.cpp
   misc/materialize.cpp
   scripting/scripting.cpp
+  json/json_constructors.cpp
+  json/json_loader.cpp
 )
 
 IF(NOT ZORBA_NO_FULL_TEXT)
@@ -174,11 +176,4 @@
 HEADER_GROUP_SUBFOLDER(RUNTIME_SRCS misc)
 HEADER_GROUP_SUBFOLDER(RUNTIME_SRCS nodes)
 HEADER_GROUP_SUBFOLDER(RUNTIME_SRCS scripting)
-
-IF (ZORBA_WITH_JSON)
-  LIST(APPEND RUNTIME_SRCS
-    json/json_constructors.cpp
-    json/json_loader.cpp
-  )
-  HEADER_GROUP_SUBFOLDER(RUNTIME_SRCS json)
-ENDIF (ZORBA_WITH_JSON)
+HEADER_GROUP_SUBFOLDER(RUNTIME_SRCS json)

=== modified file 'src/runtime/core/sequencetypes.cpp'
--- src/runtime/core/sequencetypes.cpp	2013-05-02 00:18:56 +0000
+++ src/runtime/core/sequencetypes.cpp	2013-06-15 03:00:38 +0000
@@ -517,7 +517,6 @@
     ERROR_PARAMS(ZED(XPTY0004_NoTypePromote_23), valueType, targetType));
     break;
   }
-#ifdef ZORBA_WITH_JSON
   case PROMOTE_JSONIQ_ARRAY_SELECTOR:
   {
     RAISE_ERROR(jerr::JNUP0007, loc,
@@ -536,7 +535,6 @@
     ERROR_PARAMS(ZED(JNUP0007_ObjectArray), valueType));
     break;
   }
-#endif
   case PROMOTE_INDEX_KEY:
   {
     RAISE_ERROR(zerr::ZDTY0011_INDEX_KEY_TYPE_ERROR, loc,
@@ -758,7 +756,6 @@
     ERROR_PARAMS(ZED(XPTY0004_MultiValuedGroupingKey)));
     break;
   }
-#ifdef ZORBA_WITH_JSON
   case TREAT_JSONIQ_VALUE:
   {
     RAISE_ERROR_NO_PARAMS(jerr::JNTY0002, loc);
@@ -792,7 +789,6 @@
     RAISE_ERROR_NO_PARAMS(jerr::JNUP0017, loc);
     break;
   }
-#endif
   default:
   {
     ZORBA_ASSERT(false);

=== modified file 'src/runtime/hof/dynamic_fncall_iterator.h'
--- src/runtime/hof/dynamic_fncall_iterator.h	2013-04-16 20:06:08 +0000
+++ src/runtime/hof/dynamic_fncall_iterator.h	2013-06-15 03:00:38 +0000
@@ -69,9 +69,7 @@
 
   uint32_t     theUDFStateOffset;
 
-#ifdef ZORBA_WITH_JSON
   store::Iterator_t theIterator;
-#endif
 
   DynamicFnCallIteratorState();
 

=== modified file 'src/runtime/json/json_constructors.cpp'
--- src/runtime/json/json_constructors.cpp	2013-02-26 04:12:43 +0000
+++ src/runtime/json/json_constructors.cpp	2013-06-15 03:00:38 +0000
@@ -29,8 +29,6 @@
 
 #include "diagnostics/util_macros.h"
 
-#ifdef ZORBA_WITH_JSON
-
 namespace zorba
 {
 
@@ -328,5 +326,3 @@
 NARY_ACCEPT(JSONDirectObjectIterator);
 
 }
-
-#endif // ZORBA_WITH_JSON

=== modified file 'src/runtime/json/json_constructors.h'
--- src/runtime/json/json_constructors.h	2012-03-16 07:54:58 +0000
+++ src/runtime/json/json_constructors.h	2013-06-15 03:00:38 +0000
@@ -17,8 +17,6 @@
 #ifndef ZORBA_RUNTIME_JSON_CONSTRUCTORS
 #define ZORBA_RUNTIME_JSON_CONSTRUCTORS
 
-#ifdef ZORBA_WITH_JSON
-
 #include "common/shared_types.h"
 
 #include "runtime/base/narybase.h"
@@ -164,6 +162,4 @@
 
 }
 
-#endif // ZORBA_WITH_JSON
-
 #endif

=== modified file 'src/runtime/json/json_loader.cpp'
--- src/runtime/json/json_loader.cpp	2013-02-07 03:44:12 +0000
+++ src/runtime/json/json_loader.cpp	2013-06-15 03:00:38 +0000
@@ -17,8 +17,6 @@
 #include "stdafx.h"
 #include <zorba/config.h>
 
-#ifdef ZORBA_WITH_JSON
-
 // Zorba
 #include <store/api/item.h>
 #include <store/api/store.h>
@@ -302,5 +300,4 @@
 } // namespace json
 } // namespace zorba
 
-#endif /* ZORBA_WITH_JSON */
 /* vim:set et sw=2 ts=2: */

=== modified file 'src/runtime/json/jsoniq_functions_impl.cpp'
--- src/runtime/json/jsoniq_functions_impl.cpp	2013-06-08 05:33:57 +0000
+++ src/runtime/json/jsoniq_functions_impl.cpp	2013-06-15 03:00:38 +0000
@@ -16,8 +16,6 @@
 #include "stdafx.h"
 #include <zorba/config.h>
 
-#ifdef ZORBA_WITH_JSON
-
 
 #include <sstream>
 
@@ -1911,5 +1909,4 @@
 
 } /* namespace zorba */
 
-#endif /* ZORBA_WITH_JSON */
 /* vim:set et sw=2 ts=2: */

=== modified file 'src/runtime/scripting/scripting.h'
--- src/runtime/scripting/scripting.h	2013-02-07 17:24:36 +0000
+++ src/runtime/scripting/scripting.h	2013-06-15 03:00:38 +0000
@@ -53,12 +53,10 @@
   bool nextImpl(store::Item_t& result, PlanState& aPlanState) const;
 
 protected:
-#ifdef ZORBA_WITH_JSON
   void constructJSONObject(
       store::Item_t& result,
       const PlanIter_t& iter,
       PlanState& aPlanState) const;
-#endif
 };
 
 

=== modified file 'src/runtime/update/update.cpp'
--- src/runtime/update/update.cpp	2013-05-28 18:20:54 +0000
+++ src/runtime/update/update.cpp	2013-06-15 03:00:38 +0000
@@ -850,9 +850,7 @@
 
       if (!consumeNext(copyNode, copyClause.theInput, aPlanState) ||
           (!copyNode->isNode()
-#ifdef ZORBA_WITH_JSON
            && !copyNode->isJSONItem()
-#endif
           ))
       {
         throw XQUERY_EXCEPTION(err::XUTY0013, ERROR_LOC(loc));

=== modified file 'src/runtime/visitors/planiter_visitor_impl_code.h'
--- src/runtime/visitors/planiter_visitor_impl_code.h	2013-03-26 22:31:03 +0000
+++ src/runtime/visitors/planiter_visitor_impl_code.h	2013-06-15 03:00:38 +0000
@@ -33,13 +33,11 @@
 
   PLAN_ITER_VISITOR (DocumentIterator);
 
-#ifdef ZORBA_WITH_JSON
   PLAN_ITER_VISITOR (JSONArrayIterator);
 
   PLAN_ITER_VISITOR (JSONObjectIterator);
 
   PLAN_ITER_VISITOR (JSONDirectObjectIterator);
-#endif
 
   PLAN_ITER_VISITOR (UDFunctionCallIterator);
 

=== modified file 'src/runtime/visitors/planiter_visitor_impl_include.h'
--- src/runtime/visitors/planiter_visitor_impl_include.h	2013-03-26 22:31:03 +0000
+++ src/runtime/visitors/planiter_visitor_impl_include.h	2013-06-15 03:00:38 +0000
@@ -33,12 +33,10 @@
 class NamespaceIterator;
 class CommentIterator;
 
-#ifdef ZORBA_WITH_JSON
 class JSONObjectIterator;
 class JSONArrayIterator;
 class JSONDirectObjectIterator;
 class JSONObjectInsertIterator;
-#endif
 
   class PiIterator;
   class RefIterator;

=== modified file 'src/runtime/visitors/printer_visitor_impl.cpp'
--- src/runtime/visitors/printer_visitor_impl.cpp	2013-04-17 16:18:23 +0000
+++ src/runtime/visitors/printer_visitor_impl.cpp	2013-06-15 03:00:38 +0000
@@ -1345,11 +1345,9 @@
 
   PRINTER_VISITOR_DEFINITION (NamespaceIterator)
 
-#ifdef ZORBA_WITH_JSON
   PRINTER_VISITOR_DEFINITION(JSONObjectIterator)
   PRINTER_VISITOR_DEFINITION(JSONArrayIterator)
   PRINTER_VISITOR_DEFINITION(JSONDirectObjectIterator)
-#endif
 
   PRINTER_VISITOR_DEFINITION (EmptyIterator)
   PRINTER_VISITOR_DEFINITION (IfThenElseIterator)

=== modified file 'src/runtime/visitors/printer_visitor_impl.h'
--- src/runtime/visitors/printer_visitor_impl.h	2013-03-26 22:31:03 +0000
+++ src/runtime/visitors/printer_visitor_impl.h	2013-06-15 03:00:38 +0000
@@ -237,11 +237,9 @@
   DECLARE_VISITOR (DocumentIterator)
   DECLARE_VISITOR (CommentIterator)
   DECLARE_VISITOR (PiIterator)
-#ifdef ZORBA_WITH_JSON
   DECLARE_VISITOR(JSONArrayIterator)
   DECLARE_VISITOR(JSONObjectIterator)
   DECLARE_VISITOR(JSONDirectObjectIterator)
-#endif
   DECLARE_VISITOR (EmptyIterator)
   DECLARE_VISITOR (IfThenElseIterator)
   DECLARE_VISITOR (NodeDistinctIterator)

=== modified file 'src/store/api/item_factory.h'
--- src/store/api/item_factory.h	2013-05-22 02:22:35 +0000
+++ src/store/api/item_factory.h	2013-06-15 03:00:38 +0000
@@ -795,7 +795,6 @@
    */
   virtual bool createError(Item_t& result, ZorbaException* ze) = 0;
 
-#ifdef ZORBA_WITH_JSON
   virtual bool createJSONNull(Item_t& result) = 0;
 
   virtual bool createJSONNumber(Item_t& result, Item_t& string) = 0;
@@ -844,7 +843,6 @@
       Item_t& result,
       const std::vector<Item_t>& names,
       const std::vector<Item_t>& values) = 0;
-#endif
 };
 
 } // namespace store

=== modified file 'src/store/api/pul.h'
--- src/store/api/pul.h	2013-02-07 17:24:36 +0000
+++ src/store/api/pul.h	2013-06-15 03:00:38 +0000
@@ -283,7 +283,6 @@
         const Item_t& aQName,
         const std::vector<Item_t>& aKey) = 0;
 
-#ifdef ZORBA_WITH_JSON
   // functions to add primitives for jsoniq items
 
   virtual void addJSONObjectInsert(
@@ -335,8 +334,6 @@
       store::Item_t& target,
       store::Item_t& pos,
       store::Item_t& newValue) = 0;
-#endif
-
   //
 
   virtual void mergeUpdates(Item* other) = 0;

=== modified file 'src/store/api/update_consts.h'
--- src/store/api/update_consts.h	2013-02-07 17:24:36 +0000
+++ src/store/api/update_consts.h	2013-06-15 03:00:38 +0000
@@ -102,10 +102,8 @@
     UP_CREATE_HASHMAP,
     UP_DESTROY_HASHMAP,
     UP_INSERT_INTO_HASHMAP,
-    UP_REMOVE_FROM_HASHMAP
+    UP_REMOVE_FROM_HASHMAP,
 
-#ifdef ZORBA_WITH_JSON
-    ,
     UP_JSON_OBJECT_INSERT,
     UP_JSON_OBJECT_DELETE,
     UP_JSON_OBJECT_REPLACE_VALUE,
@@ -114,7 +112,6 @@
     UP_JSON_ARRAY_APPEND,
     UP_JSON_ARRAY_DELETE,
     UP_JSON_ARRAY_REPLACE_VALUE,
-#endif
   };
 
   static bool isRename(UpdPrimKind k)
@@ -224,22 +221,20 @@
       return "setElementType";
     case UP_REVALIDATE:
       return "revalidate";
-#ifdef ZORBA_WITH_JSON
-  case UP_JSON_OBJECT_INSERT:
-    return "jsonObjectInsert";
-  case UP_JSON_OBJECT_DELETE:
-    return "jsonObjectDelete";
-  case UP_JSON_OBJECT_REPLACE_VALUE:
-    return "jsonObjectReplaceValue";
-  case UP_JSON_OBJECT_RENAME:
-    return "jsonObjectRename";
-  case UP_JSON_ARRAY_INSERT:
-    return "jsonArrayInsert";
-  case UP_JSON_ARRAY_DELETE:
-    return "jsonArrayDelete";
-  case UP_JSON_ARRAY_REPLACE_VALUE:
-    return "jsonArrayReplaceValue";
-#endif
+    case UP_JSON_OBJECT_INSERT:
+      return "jsonObjectInsert";
+    case UP_JSON_OBJECT_DELETE:
+      return "jsonObjectDelete";
+    case UP_JSON_OBJECT_REPLACE_VALUE:
+      return "jsonObjectReplaceValue";
+    case UP_JSON_OBJECT_RENAME:
+      return "jsonObjectRename";
+    case UP_JSON_ARRAY_INSERT:
+      return "jsonArrayInsert";
+    case UP_JSON_ARRAY_DELETE:
+      return "jsonArrayDelete";
+    case UP_JSON_ARRAY_REPLACE_VALUE:
+      return "jsonArrayReplaceValue";
     default:
       return "unknownUpdatePrimitive";
   }

=== modified file 'src/store/naive/CMakeLists.txt'
--- src/store/naive/CMakeLists.txt	2013-02-26 04:12:43 +0000
+++ src/store/naive/CMakeLists.txt	2013-06-15 03:00:38 +0000
@@ -51,6 +51,7 @@
     string_pool.cpp
     structured_item.cpp
     tree_id_generator.cpp
+    json_items.cpp
 )
 
 IF (NOT ZORBA_NO_FULL_TEXT)
@@ -59,10 +60,4 @@
     naive_ft_token_iterator.cpp)
 ENDIF (NOT ZORBA_NO_FULL_TEXT)
 
-IF (ZORBA_WITH_JSON)
-  LIST(APPEND ZORBA_STORE_IMPL_SRCS
-    json_items.cpp
-  )
-ENDIF (ZORBA_WITH_JSON)
-
 # vim:set et sw=2 ts=2:

=== modified file 'src/store/naive/item.cpp'
--- src/store/naive/item.cpp	2013-06-05 00:37:35 +0000
+++ src/store/naive/item.cpp	2013-06-15 03:00:38 +0000
@@ -28,9 +28,7 @@
 #include "store_defs.h"
 #include "atomic_items.h"
 #include "node_items.h"
-#ifdef ZORBA_WITH_JSON
-#  include "json_items.h"
-#endif
+#include "json_items.h"
 
 #include "runtime/hof/function_item.h"
 
@@ -1333,8 +1331,6 @@
 }
 
 
-#ifdef ZORBA_WITH_JSON
-
 store::StoreConsts::JSONItemKind Item::getJSONItemKind() const
 {
   throw ZORBA_EXCEPTION(
@@ -1404,8 +1400,6 @@
   ERROR_PARAMS(__FUNCTION__, getType()->getStringValue()));
 }
 
-#endif // ZORBA_WITH_JSON
-
 
 ZorbaException* Item::getError() const
 {

=== modified file 'src/store/naive/node_iterators.cpp'
--- src/store/naive/node_iterators.cpp	2013-06-05 00:37:35 +0000
+++ src/store/naive/node_iterators.cpp	2013-06-15 03:00:38 +0000
@@ -344,7 +344,6 @@
   theNodes.clear();
   theCurrentNode = 0;
 
-#ifdef ZORBA_WITH_JSON
   for (std::set<json::JSONItem*>::iterator ite = theJSONItems.begin();
       ite != theJSONItems.end();
       ++ite)
@@ -353,7 +352,6 @@
     n->removeReference();
   }
   theJSONItems.clear();
-#endif
 }
 
 
@@ -372,7 +370,6 @@
   theNodes.clear();
   theCurrentNode = 0;
 
-#ifdef ZORBA_WITH_JSON
   for (std::set<json::JSONItem*>::iterator ite = theJSONItems.begin();
       ite != theJSONItems.end();
       ++ite)
@@ -381,7 +378,6 @@
     n->removeReference();
   }
   theJSONItems.clear();
-#endif
 
   theInput = NULL;
 }

=== modified file 'src/store/naive/node_iterators.h'
--- src/store/naive/node_iterators.h	2013-02-07 17:24:36 +0000
+++ src/store/naive/node_iterators.h	2013-06-15 03:00:38 +0000
@@ -22,9 +22,7 @@
 #include "store/api/iterator.h"
 #include "shared_types.h"
 #include "node_items.h"
-#ifdef ZORBA_WITH_JSON
 #include "json_items.h"
-#endif
 
 #include "zorbautils/hashfun.h"
 #include "zorbautils/hashset_node_itemh.h"
@@ -466,9 +464,7 @@
   std::vector<XmlNode*>   theNodes;
   csize                   theCurrentNode;
   
-#ifdef ZORBA_WITH_JSON
   std::set<json::JSONItem*>  theJSONItems;
-#endif
 
 public:
   StoreNodeSortIterator(

=== modified file 'src/store/naive/pul_primitive_factory.cpp'
--- src/store/naive/pul_primitive_factory.cpp	2013-02-07 17:24:36 +0000
+++ src/store/naive/pul_primitive_factory.cpp	2013-06-15 03:00:38 +0000
@@ -590,7 +590,6 @@
 }
 
 
-#ifdef ZORBA_WITH_JSON
 /******************************************************************************
 
 *******************************************************************************/
@@ -707,7 +706,5 @@
   return new UpdJSONArrayReplaceValue(pul, loc, target, pos, newValue);
 }
 
-#endif
-
 } /* namespace simplestore */ } /* namespace zorba */
 /* vim:set et sw=2 ts=2: */

=== modified file 'src/store/naive/pul_primitive_factory.h'
--- src/store/naive/pul_primitive_factory.h	2013-02-07 17:24:36 +0000
+++ src/store/naive/pul_primitive_factory.h	2013-06-15 03:00:38 +0000
@@ -69,7 +69,6 @@
   class UpdDestroyHashMap;
   class UpdInsertIntoHashMap;
   class UpdRemoveFromHashMap;
-#ifdef ZORBA_WITH_JSON
   class UpdJSONObjectInsert;
   class UpdJSONObjectDelete;
   class UpdJSONObjectReplaceValue;
@@ -78,7 +77,6 @@
   class UpdJSONArrayInsert;
   class UpdJSONArrayDelete;
   class UpdJSONArrayReplaceValue;
-#endif
 
 class PULPrimitiveFactory 
 {
@@ -378,8 +376,6 @@
 
   /***************************************************************************/
 
-#ifdef ZORBA_WITH_JSON
-
   virtual UpdJSONObjectInsert*
   createUpdJSONObjectInsert(
       CollectionPul* pul,
@@ -440,7 +436,6 @@
         store::Item_t& target,
         xs_integer& pos,
         store::Item_t& newValue);
-#endif
 
 }; /* class PULPrimitiveFactory */
     

=== modified file 'src/store/naive/pul_primitives.cpp'
--- src/store/naive/pul_primitives.cpp	2013-06-05 00:37:35 +0000
+++ src/store/naive/pul_primitives.cpp	2013-06-15 03:00:38 +0000
@@ -1974,7 +1974,6 @@
 {
 }
 
-#ifdef ZORBA_WITH_JSON
 /*******************************************************************************
 
 ********************************************************************************/
@@ -2395,9 +2394,6 @@
   theIsApplied = false;
 }
 
-
-#endif
-
 } // namespace simplestore
 } // namespace zorba
 /* vim:set et sw=2 ts=2: */

=== modified file 'src/store/naive/pul_primitives.h'
--- src/store/naive/pul_primitives.h	2013-02-07 17:24:36 +0000
+++ src/store/naive/pul_primitives.h	2013-06-15 03:00:38 +0000
@@ -1675,7 +1675,6 @@
 };
 
 
-#ifdef ZORBA_WITH_JSON
 /*******************************************************************************
 
 ********************************************************************************/
@@ -1968,8 +1967,6 @@
 };
 
 
-#endif // ZORBA_WITH_JSON
-
 } /* namespace simplestore */
 } /* namespace zorba */
 #endif

=== modified file 'src/store/naive/shared_types.h'
--- src/store/naive/shared_types.h	2013-02-07 17:24:36 +0000
+++ src/store/naive/shared_types.h	2013-06-15 03:00:38 +0000
@@ -44,7 +44,6 @@
 
 typedef rchandle<store::IndexEntryCreator> IndexEntryCreator_t;
 
-#ifdef ZORBA_WITH_JSON
 namespace json {
 
 class JSONItem;
@@ -64,7 +63,6 @@
 typedef store::ItemHandle<JSONTree>         JSONTree_t;
 
 } /* namespace json */
-#endif
 
 class CollectionSet;
 

=== modified file 'src/store/naive/simple_collection.cpp'
--- src/store/naive/simple_collection.cpp	2013-05-02 18:34:27 +0000
+++ src/store/naive/simple_collection.cpp	2013-06-15 03:00:38 +0000
@@ -26,9 +26,7 @@
 #include "simple_store.h"
 #include "store_defs.h"
 #include "node_items.h"
-#ifdef ZORBA_WITH_JSON
-#  include "json_items.h"
-#endif
+#include "json_items.h"
 
 #include "zorbatypes/numconversions.h"
 

=== modified file 'src/store/naive/simple_item_factory.cpp'
--- src/store/naive/simple_item_factory.cpp	2013-06-05 00:37:35 +0000
+++ src/store/naive/simple_item_factory.cpp	2013-06-15 03:00:38 +0000
@@ -36,9 +36,7 @@
 #include "node_factory.h"
 #include "tree_id.h"
 
-#ifdef ZORBA_WITH_JSON
-#  include "json_items.h"
-#endif
+#include "json_items.h"
 
 #include "util/ascii_util.h"
 #include "util/stream_util.h"
@@ -52,10 +50,8 @@
   theUriPool(uriPool),
   theQNamePool(qnPool),
   theTrueItem(new BooleanItem(store::XS_BOOLEAN, true)),
-  theFalseItem(new BooleanItem(store::XS_BOOLEAN, false))
-#ifdef ZORBA_WITH_JSON
-  ,theNullItem(new json::JSONNull())
-#endif
+  theFalseItem(new BooleanItem(store::XS_BOOLEAN, false)),
+  theNullItem(new json::JSONNull())
 {
 }
 
@@ -2222,7 +2218,6 @@
 }
 
 
-#ifdef ZORBA_WITH_JSON
 /*******************************************************************************
 
 ********************************************************************************/
@@ -2441,8 +2436,6 @@
 }
 
 
-#endif
-
 } // namespace simplestore
 } // namespace zorba
 /* vim:set et sw=2 ts=2: */

=== modified file 'src/store/naive/simple_item_factory.h'
--- src/store/naive/simple_item_factory.h	2013-05-22 02:22:35 +0000
+++ src/store/naive/simple_item_factory.h	2013-06-15 03:00:38 +0000
@@ -57,9 +57,7 @@
   // returns one of them
   store::Item_t theTrueItem;
   store::Item_t theFalseItem;
-#ifdef ZORBA_WITH_JSON
   store::Item_t theNullItem;
-#endif
 
 public:
   BasicItemFactory(UriPool* uriPool, QNamePool* qnPool);
@@ -414,7 +412,6 @@
       const signature&,
       const store::Iterator_t&);
 
-#ifdef ZORBA_WITH_JSON
   bool createJSONNull(store::Item_t& result);
 
   bool createJSONNumber(
@@ -451,7 +448,6 @@
       store::Item_t& result,
       const std::vector<store::Item_t>& names,
       const std::vector<store::Item_t>& values);
-#endif
 
 private:
   void splitToAtomicTextValues(

=== modified file 'src/store/naive/simple_pul.cpp'
--- src/store/naive/simple_pul.cpp	2013-06-05 00:37:35 +0000
+++ src/store/naive/simple_pul.cpp	2013-06-15 03:00:38 +0000
@@ -28,9 +28,7 @@
 #include "simple_pul.h"
 #include "pul_primitives.h"
 #include "node_items.h"
-#ifdef ZORBA_WITH_JSON
-#  include "json_items.h"
-#endif
+#include "json_items.h"
 #include "atomic_items.h"
 #include "pul_primitive_factory.h"
 #include "node_factory.h"
@@ -168,12 +166,8 @@
 {
   const QNameItem* collName;
 
-#ifdef ZORBA_WITH_JSON
   assert(target->isNode()
       || target->isJSONItem());
-#else
-  assert(target->isNode());
-#endif
 
   assert(dynamic_cast<const StructuredItem*>(target));
   const StructuredItem* lStructuredItem =
@@ -1749,7 +1743,6 @@
                                  thisPul->theDeleteCollectionList,
                                  otherPul->theDeleteCollectionList);
 
-#ifdef ZORBA_WITH_JSON
       // merge jsoniq primitives
       mergeTargetedUpdateLists(thisPul,
                                thisPul->theJSONObjectInsertList,
@@ -1782,7 +1775,6 @@
       mergeTargetedUpdateLists(thisPul,
                                thisPul->theJSONArrayAppendList,
                                otherPul->theJSONArrayAppendList);
-#endif
 
       ++thisIte;
       ++otherIte;
@@ -2011,7 +2003,6 @@
         break;
       }
 
-#ifdef ZORBA_WITH_JSON
       // merge object-insert primitives and raise error if duplicate names
       case store::UpdateConsts::UP_JSON_OBJECT_INSERT:
       {
@@ -2189,7 +2180,6 @@
         break;
       }
 
-#endif
 
       default:
         break;
@@ -2675,7 +2665,6 @@
   cleanList(theTruncateCollectionList);
   cleanList(theDeleteCollectionList);
 
-#ifdef ZORBA_WITH_JSON
   cleanList(theJSONObjectInsertList);
   cleanList(theJSONObjectDeleteList);
   cleanList(theJSONObjectReplaceValueList);
@@ -2684,7 +2673,6 @@
   cleanList(theJSONArrayDeleteList);
   cleanList(theJSONArrayReplaceValueList);
   cleanList(theJSONArrayAppendList);
-#endif
 
   cleanIndexDeltas();
 }
@@ -2704,7 +2692,6 @@
   switchPulInPrimitivesList(theDeleteList);
   switchPulInPrimitivesList(theRevalidateList);
 
-#ifdef ZORBA_WITH_JSON
   switchPulInPrimitivesList(theJSONObjectInsertList);
   switchPulInPrimitivesList(theJSONObjectDeleteList);
   switchPulInPrimitivesList(theJSONObjectReplaceValueList);
@@ -2713,7 +2700,6 @@
   switchPulInPrimitivesList(theJSONArrayDeleteList);
   switchPulInPrimitivesList(theJSONArrayReplaceValueList);
   switchPulInPrimitivesList(theJSONArrayAppendList);
-#endif
 
   switchPulInPrimitivesList(theCreateCollectionList);
   switchPulInPrimitivesList(theInsertIntoCollectionList);

=== modified file 'src/store/naive/simple_pul.h'
--- src/store/naive/simple_pul.h	2013-02-07 17:24:36 +0000
+++ src/store/naive/simple_pul.h	2013-06-15 03:00:38 +0000
@@ -208,7 +208,6 @@
   std::vector<IndexDeltaImpl>        theInsertedDocsIndexDeltas;
   std::vector<IndexDeltaImpl>        theDeletedDocsIndexDeltas;
 
-#ifdef ZORBA_WITH_JSON
   // jsoniq primitives
   std::vector<UpdatePrimitive*>      theJSONObjectInsertList;
   std::vector<UpdatePrimitive*>      theJSONObjectDeleteList;
@@ -219,7 +218,6 @@
   std::vector<UpdatePrimitive*>      theJSONArrayAppendList;
   std::vector<UpdatePrimitive*>      theJSONArrayDeleteList;
   std::vector<UpdatePrimitive*>      theJSONArrayReplaceValueList;
-#endif
 
   std::vector<csize>                 theNumBeforeIndexDeltasApplied;
   std::vector<csize>                 theNumAfterIndexDeltasApplied;
@@ -582,7 +580,6 @@
       const store::Item_t& aQName,
       const std::vector<store::Item_t>& aKey);
 
-#ifdef ZORBA_WITH_JSON
   // jsoniq primitives
 
   virtual void addJSONObjectInsert(
@@ -634,7 +631,6 @@
       store::Item_t& target,
       store::Item_t& pos,
       store::Item_t& newValue);
-#endif
 
   // merge
   void mergeUpdates(store::Item* other);

=== modified file 'src/store/naive/store.cpp'
--- src/store/naive/store.cpp	2013-06-01 00:30:39 +0000
+++ src/store/naive/store.cpp	2013-06-15 03:00:38 +0000
@@ -185,11 +185,9 @@
 
   theSchemaTypeNames.resize(store::XS_LAST);
 
-#ifdef ZORBA_WITH_JSON
   JS_NULL_QNAME = theQNamePool->insert(JS_URI, "js", "null");
   JS_OBJECT_QNAME = theQNamePool->insert(JS_URI, "js", "object");
   JS_ARRAY_QNAME = theQNamePool->insert(JS_URI, "js", "array");
-#endif
 
   XS_UNTYPED_QNAME = theQNamePool->insert(ns, "xs", "untyped");
 
@@ -324,11 +322,9 @@
       XS_ANY_QNAME = NULL;
       XS_ANY_SIMPLE_QNAME = NULL;
 
-#ifdef ZORBA_WITH_JSON
       JS_OBJECT_QNAME = NULL;
       JS_ARRAY_QNAME = NULL;
       JS_NULL_QNAME = NULL;
-#endif
 
       delete theQNamePool;
       theQNamePool = NULL;
@@ -609,11 +605,7 @@
     {
       bool more = true;
 
-#ifdef ZORBA_WITH_JSON
       assert(domainNode->isStructuredItem());
-#else
-      assert(domainNode->isNode());
-#endif
       assert(keyItem == NULL);
 
       // Compute the keys associated with the current domain node. Note: We
@@ -632,11 +624,7 @@
 
         // If current node has no keys, put it in the "null" entry and continue
         // with the next domain node, if nay.
-#ifdef ZORBA_WITH_JSON
         if (!more || firstKeyItem->isStructuredItem())
-#else
-        if (!more || firstKeyItem->isNode())
-#endif
         {
           index->insert(keyItem, domainNode);
 
@@ -649,11 +637,7 @@
 
         // If current domain node has exactly 1 key, insert it in the index
         // and continue with next domain node, if any.
-#ifdef ZORBA_WITH_JSON
         if (!more || keyItem->isStructuredItem())
-#else
-        if (!more || keyItem->isNode())
-#endif
         {
           index->insert(firstKeyItem, domainNode);
 
@@ -674,11 +658,7 @@
         // Compute next keys or next domain node.
         while ((more = sourceIter->next(keyItem)))
         {
-#ifdef ZORBA_WITH_JSON
           if (keyItem->isStructuredItem())
-#else
-          if (keyItem->isNode())
-#endif
           {
             domainNode.transfer(keyItem);
             break;

=== modified file 'src/store/naive/store.h'
--- src/store/naive/store.h	2013-02-07 17:24:36 +0000
+++ src/store/naive/store.h	2013-06-15 03:00:38 +0000
@@ -158,11 +158,9 @@
   store::Item_t                 XS_ANY_QNAME;
   store::Item_t                 XS_ANY_SIMPLE_QNAME;
 
-#ifdef ZORBA_WITH_JSON
   store::Item_t                 JS_OBJECT_QNAME;
   store::Item_t                 JS_ARRAY_QNAME;
   store::Item_t                 JS_NULL_QNAME;
-#endif
 
 protected:
   ulong                         theNumUsers;

=== modified file 'src/types/root_typemanager.cpp'
--- src/types/root_typemanager.cpp	2013-04-11 22:29:26 +0000
+++ src/types/root_typemanager.cpp	2013-06-15 03:00:38 +0000
@@ -200,9 +200,7 @@
 #define ATOMIC_QNAMETYPE_MAP_SIZE 150   //50
  
 
-#ifdef ZORBA_WITH_JSON
 const XQType* RootTypeManager::JSON_TYPES_MAP[3][4];
-#endif
 
 
 RootTypeManager::RootTypeManager()
@@ -288,12 +286,10 @@
   XSQNDECL(XS_IDREFS_QNAME, "IDREFS");
   XSQNDECL(XS_ENTITIES_QNAME, "ENTITIES");
 
-#ifdef ZORBA_WITH_JSON
   GENV_STORE.getItemFactory()->createQName(JS_NULL_QNAME,
                                            static_context::JSONIQ_DM_NS,
                                            "js",
                                            "null");
-#endif
 
   store::Item* tempQN = NULL;
   store::SchemaTypeCode tempCode;
@@ -418,7 +414,6 @@
   STRUCTURED_ITEM_TYPE_PLUS = 
   new StructuredItemXQType(this, TypeConstants::QUANT_PLUS, true);
 
-#ifdef ZORBA_WITH_JSON
   JS_NULL_TYPE_ONE = new AtomicXQType(this,
                                       store::JS_NULL,
                                       TypeConstants::QUANT_ONE,
@@ -488,7 +483,6 @@
   JSON_TYPE_DEFN(JSON_ARRAY, store::StoreConsts::jsonArray);
 
 #undef JSON_TYPE_DEFN
-#endif // ZORBA_WITH_JSON
 
   store::Item_t nullNodeName;
 
@@ -598,13 +592,11 @@
   delete XS_IDREFS_TYPE.getp();
   XS_IDREFS_TYPE.setNull();
 
-#ifdef ZORBA_WITH_JSON
   DELETE_TYPE(JS_NULL)
 
   DELETE_TYPE(JSON_ITEM)
   DELETE_TYPE(JSON_OBJECT)
   DELETE_TYPE(JSON_ARRAY)
-#endif
 
   DELETE_TYPE(ITEM)
 

=== modified file 'src/types/root_typemanager.h'
--- src/types/root_typemanager.h	2013-03-12 17:03:31 +0000
+++ src/types/root_typemanager.h	2013-06-15 03:00:38 +0000
@@ -127,7 +127,6 @@
   ATOMIC_DECL(NOTATION)
 #undef ATOMIC_DECL
 
-#ifdef ZORBA_WITH_JSON
   /**
    * Pre-allocate XQType objects for the following sequence types:
    *
@@ -138,7 +137,6 @@
   xqtref_t JS_NULL_TYPE_QUESTION;
   xqtref_t JS_NULL_TYPE_STAR;
   xqtref_t JS_NULL_TYPE_PLUS;
-#endif
 
   /**
    *  Pre-allocate XQType objects for structured-item(), structured-item()?,
@@ -149,7 +147,6 @@
   xqtref_t STRUCTURED_ITEM_TYPE_STAR;
   xqtref_t STRUCTURED_ITEM_TYPE_PLUS;
 
-#ifdef ZORBA_WITH_JSON
   /**
    * Pre-allocate XQType objects for the following JSONTest sequence types:
    *
@@ -172,8 +169,6 @@
    */
   static const XQType* JSON_TYPES_MAP[3][4];
 
-#endif // ZORBA_WITH_JSON
-
   /**
    * Pre-allocate XQType objects for the following KindTest sequence types:
    *

=== modified file 'src/types/typeimpl.cpp'
--- src/types/typeimpl.cpp	2013-06-03 23:03:58 +0000
+++ src/types/typeimpl.cpp	2013-06-15 03:00:38 +0000
@@ -71,9 +71,7 @@
 
 SERIALIZABLE_CLASS_VERSIONS(UserDefinedXQType)
 
-#ifdef ZORBA_WITH_JSON
 SERIALIZABLE_CLASS_VERSIONS(JSONXQType)
-#endif
 
 
 const char* XQType::KIND_STRINGS[XQType::MAX_TYPE_KIND] =
@@ -530,9 +528,6 @@
     result += TypeOps::decode_quantifier(get_quantifier());
     break;
   }
-
-#ifdef ZORBA_WITH_JSON
-
   case JSON_TYPE_KIND:
   {
     const JSONXQType* type = static_cast<const JSONXQType*>(this);
@@ -554,7 +549,6 @@
     result += TypeOps::decode_quantifier(get_quantifier());
     break;
   }
-#endif
 
   case NODE_TYPE_KIND:
   {
@@ -710,7 +704,6 @@
 }
 
 
-#ifdef ZORBA_WITH_JSON
 /////////////////////////////////////////////////////////////////////////////////
 //                                                                             //
 //  JSONXQType                                                                 //
@@ -754,8 +747,6 @@
   return os << "]";
 }
 
-#endif // ZORBA_WITH_JSON
-
 
 /////////////////////////////////////////////////////////////////////////////////
 //                                                                             //

=== modified file 'src/types/typeimpl.h'
--- src/types/typeimpl.h	2013-06-03 23:03:58 +0000
+++ src/types/typeimpl.h	2013-06-15 03:00:38 +0000
@@ -525,7 +525,6 @@
 };
 
 
-#ifdef ZORBA_WITH_JSON
 /***************************************************************************//**
   Class JSONXQType represents all the sequence types whose ItemType is a
   JSONTest.
@@ -551,7 +550,6 @@
 
   std::ostream& serialize_ostream(std::ostream& os) const;
 };
-#endif
 
 
 /***************************************************************************//**

=== modified file 'src/types/typemanager.h'
--- src/types/typemanager.h	2013-04-17 16:18:23 +0000
+++ src/types/typemanager.h	2013-06-15 03:00:38 +0000
@@ -124,11 +124,9 @@
 
   virtual xqtref_t create_structured_item_type(TypeConstants::quantifier_t q) const = 0;
 
-#ifdef ZORBA_WITH_JSON
  virtual xqtref_t create_json_type(
         store::StoreConsts::JSONItemKind kind,
         TypeConstants::quantifier_t q) const = 0;
-#endif
 
   virtual xqtref_t create_node_type(
         store::StoreConsts::NodeKind nodeKind,

=== modified file 'src/types/typemanagerimpl.cpp'
--- src/types/typemanagerimpl.cpp	2013-05-21 21:44:25 +0000
+++ src/types/typemanagerimpl.cpp	2013-06-15 03:00:38 +0000
@@ -484,7 +484,6 @@
 }
 
 
-#ifdef ZORBA_WITH_JSON
 /***************************************************************************//**
   Create a sequence type based on json item kind and a quantifier
 ********************************************************************************/
@@ -494,7 +493,6 @@
 {
   return GENV_TYPESYSTEM.JSON_TYPES_MAP[kind][quantifier];
 }
-#endif
 
 
 /***************************************************************************//**
@@ -834,12 +832,10 @@
     }
   }
 
-#ifdef ZORBA_WITH_JSON
   else if (item->isJSONItem())
   {
     return create_json_type(item->getJSONItemKind(), quant);
   }
-#endif
 
   else if (item->isFunction())
   {
@@ -1017,13 +1013,11 @@
     return create_structured_item_type(quantifier);
   }
 
-#ifdef ZORBA_WITH_JSON
   case XQType::JSON_TYPE_KIND:
   {
     const JSONXQType& jt = static_cast<const JSONXQType&>(type);
     return create_json_type(jt.get_json_kind(), quantifier);
   }
-#endif
 
   case XQType::FUNCTION_TYPE_KIND:
   {
@@ -1218,7 +1212,6 @@
   case IdentTypes::ANY_NODE_TYPE:
     return create_builtin_node_type(store::StoreConsts::anyNode, q, false);
 
-#ifdef ZORBA_WITH_JSON
   case IdentTypes::JSON_ITEM_TYPE:
     return create_json_type(store::StoreConsts::jsonItem, q);
 
@@ -1227,7 +1220,6 @@
 
   case IdentTypes::JSON_ARRAY_TYPE:
     return create_json_type(store::StoreConsts::jsonArray, q);
-#endif // #ifdef ZORBA_WITH_JSON
 
   case IdentTypes::ITEM_TYPE:
     return create_any_item_type(q);

=== modified file 'src/types/typemanagerimpl.h'
--- src/types/typemanagerimpl.h	2013-04-17 16:18:23 +0000
+++ src/types/typemanagerimpl.h	2013-06-15 03:00:38 +0000
@@ -121,11 +121,9 @@
 
   xqtref_t create_structured_item_type(TypeConstants::quantifier_t q) const;
 
-#ifdef ZORBA_WITH_JSON
   xqtref_t create_json_type(
       store::StoreConsts::JSONItemKind kind,
       TypeConstants::quantifier_t quantifier) const;
-#endif
 
   xqtref_t create_node_type(
       store::StoreConsts::NodeKind nodeKind,

=== modified file 'src/types/typeops.cpp'
--- src/types/typeops.cpp	2013-06-11 05:40:04 +0000
+++ src/types/typeops.cpp	2013-06-15 03:00:38 +0000
@@ -320,9 +320,7 @@
   case XQType::STRUCTURED_ITEM_KIND:
     return GENV_TYPESYSTEM.STRUCTURED_ITEM_TYPE_ONE;
 
-#ifdef ZORBA_WITH_JSON
   case XQType::JSON_TYPE_KIND: 
-#endif 
   case XQType::NODE_TYPE_KIND:
 
   {
@@ -397,7 +395,6 @@
 
       return n1.is_equal(tm, n2);
     }
-#ifdef ZORBA_WITH_JSON
     case XQType::JSON_TYPE_KIND:
     {
       const JSONXQType& j1 = static_cast<const JSONXQType&>(type1);
@@ -405,7 +402,6 @@
 
       return j1.get_json_kind() == j2.get_json_kind();
     }
-#endif
     case XQType::USER_DEFINED_KIND:
     {
       const UserDefinedXQType& udt1 = static_cast<const UserDefinedXQType&>(type1);
@@ -972,23 +968,17 @@
       case XQType::STRUCTURED_ITEM_KIND:
         return rtm.STRUCTURED_ITEM_TYPE_ONE;
 
-#ifdef ZORBA_WITH_JSON
       case XQType::JSON_TYPE_KIND:
         return rtm.JSON_ITEM_TYPE_ONE;
-#endif
       default:
         break;
       }
     }
     else if ((kind1 == XQType::NODE_TYPE_KIND || 
-#ifdef ZORBA_WITH_JSON
               kind1 == XQType::JSON_TYPE_KIND ||
-#endif
               kind1 == XQType::STRUCTURED_ITEM_KIND) &&
              (kind2 == XQType::NODE_TYPE_KIND ||
-#ifdef ZORBA_WITH_JSON
               kind2 == XQType::JSON_TYPE_KIND ||
-#endif
               kind2 == XQType::STRUCTURED_ITEM_KIND))
     {
       return rtm.STRUCTURED_ITEM_TYPE_ONE;
@@ -1101,12 +1091,10 @@
       return rtm.NONE_TYPE;
     }
 
-#ifdef ZORBA_WITH_JSON
     case XQType::JSON_TYPE_KIND:
     {
       return rtm.NONE_TYPE;
     }
-#endif
 
     default:
       break;
@@ -1319,7 +1307,6 @@
     return TypeIdentifier::createStructuredItemType(q);
   }
 
-#ifdef ZORBA_WITH_JSON
   case XQType::JSON_TYPE_KIND:
   {
     const JSONXQType& t = static_cast<const JSONXQType&>(type);
@@ -1339,7 +1326,6 @@
       ZORBA_ASSERT(false);
     }
   }
-#endif
 
   case XQType::NODE_TYPE_KIND:
   {

=== modified file 'src/zorbaserialization/archiver_consts.h'
--- src/zorbaserialization/archiver_consts.h	2013-03-26 22:31:03 +0000
+++ src/zorbaserialization/archiver_consts.h	2013-06-15 03:00:38 +0000
@@ -151,9 +151,7 @@
   TYPE_AtomicXQType,
   TYPE_StructuredItemXQType,
   TYPE_NodeXQType,
-#ifdef ZORBA_WITH_JSON
   TYPE_JSONXQType,
-#endif
   TYPE_FunctionXQType,
   TYPE_ItemXQType,
   TYPE_AnyXQType,
@@ -276,11 +274,9 @@
   TYPE_DeleteIterator,
   TYPE_InsertIterator,
 
-#ifdef ZORBA_WITH_JSON
   TYPE_JSONObjectIterator,
   TYPE_JSONDirectObjectIterator,
   TYPE_JSONArrayIterator,
-#endif
 
   TYPE_EvalIterator,
 

=== modified file 'src/zorbaserialization/serialize_zorba_types.cpp'
--- src/zorbaserialization/serialize_zorba_types.cpp	2013-06-05 00:37:35 +0000
+++ src/zorbaserialization/serialize_zorba_types.cpp	2013-06-15 03:00:38 +0000
@@ -215,9 +215,7 @@
 void serialize_my_children(Archiver& ar, store::Iterator_t iter);
 void serialize_my_children2(Archiver& ar, store::Iterator_t iter);
 
-#ifdef ZORBA_WITH_JSON
 void serialize_json_tree(Archiver &ar, store::Item *&obj);
-#endif
 
 
 #define SERIALIZE_FIELD(type, var, get_func)\
@@ -781,12 +779,10 @@
     break;
   }
  
- #ifdef ZORBA_WITH_JSON
   case store::JS_NULL:
   {
     break;
   }
-#endif
 
   default:
   {
@@ -1091,7 +1087,6 @@
     DESERIALIZE_ATOMIC_ITEM(xs_hexBinary, createHexBinary);
   }
 
- #ifdef ZORBA_WITH_JSON
   case store::JS_NULL:
   {
     store::Item_t lRes;
@@ -1103,7 +1098,6 @@
 
     break;
   }
-#endif
 
   default:
   {
@@ -1395,7 +1389,6 @@
 }
 
 
-#ifdef ZORBA_WITH_JSON
 /*******************************************************************************
 
 ********************************************************************************/
@@ -1520,7 +1513,6 @@
   default: assert(false);
   }
 }
-#endif // ZORBA_WITH_JSON
 
 
 /*******************************************************************************
@@ -1555,10 +1547,8 @@
     UserError* user_err = dynamic_cast<UserError*>(diagnostic);
     XQueryErrorCode* xquery_err = dynamic_cast<XQueryErrorCode*>(diagnostic);
     ZorbaErrorCode* zorba_err = dynamic_cast<ZorbaErrorCode*>(diagnostic);
-#ifdef ZORBA_WITH_JSON
     JSONiqErrorCode* jsoniq_err = dynamic_cast<JSONiqErrorCode*>(diagnostic);
     bool isJsoniqErr = (jsoniq_err != NULL);
-#endif
 
     bool isUserErr = (user_err != NULL);
     bool isXQueryErr = (xquery_err != NULL);
@@ -1572,9 +1562,7 @@
       ar & isUserErr;
       ar & isXQueryErr;
       ar & isZorbaErr;
-#ifdef ZORBA_WITH_JSON
       ar & isJsoniqErr;
-#endif
 
       if (user_err)
       {
@@ -1617,9 +1605,7 @@
       ar & is_user;
       ar & is_xquery;
       ar & is_zorba;
-#ifdef ZORBA_WITH_JSON
       ar & is_jsoniq;
-#endif
 
       if (is_user)
       {

=== modified file 'test/driver/testdriver.cpp'
--- test/driver/testdriver.cpp	2013-05-31 03:42:33 +0000
+++ test/driver/testdriver.cpp	2013-06-15 03:00:38 +0000
@@ -427,11 +427,7 @@
         // QQQ all this code should be in testdriver_common and used by
         // testdriver_mt as well
         // Initialize default serialization method
-#ifdef ZORBA_WITH_JSON
         lSerOptions.ser_method = ZORBA_SERIALIZATION_METHOD_JSON_XML_HYBRID;
-#else /* ZORBA_WITH_JSON */
-        lSerOptions.ser_method = ZORBA_SERIALIZATION_METHOD_XML;
-#endif /* ZORBA_WITH_JSON */
         lSerOptions.omit_xml_declaration = ZORBA_OMIT_XML_DECLARATION_YES;
 
         // Now set any options specified in .spec file
@@ -543,13 +539,11 @@
           std::cout << "testdriver: skipping canonicalization "
             "when testing with method=[x]html" << std::endl;
         }
-#ifdef ZORBA_WITH_JSON
         // Also skip canonicalization for tests using method==json
         else if (lSerOptions.ser_method == ZORBA_SERIALIZATION_METHOD_JSON) {
           std::cout << "testdriver: skipping canonicalization "
             "when testing with method=json" << std::endl;
         }
-#endif
         else {
           int lCanonicalRes = zorba::canonicalizeAndCompare(lSpec.getComparisonMethod(),
             lIter->c_str(),

=== modified file 'test/rbkt/Queries/CMakeLists.txt'
--- test/rbkt/Queries/CMakeLists.txt	2013-05-16 09:19:07 +0000
+++ test/rbkt/Queries/CMakeLists.txt	2013-06-15 03:00:38 +0000
@@ -155,16 +155,14 @@
     ENDIF(NEEDS_FILE)
   ENDIF(NOT ZORBA_WITH_FILE_ACCESS)
 
-  IF (NOT ZORBA_WITH_JSON)
-    STRING(REGEX MATCH "jsoniq/" NEEDS_FILE "${TESTNAME}")
-    IF(NEEDS_FILE)
-      SET(SKIP_TEST 1)
-    ENDIF(NEEDS_FILE)
-    STRING(REGEX MATCH "cloudscript/" NEEDS_FILE "${TESTNAME}")
-    IF(NEEDS_FILE)
-      SET(SKIP_TEST 1)
-    ENDIF(NEEDS_FILE)
-  ENDIF(NOT ZORBA_WITH_JSON)
+  STRING(REGEX MATCH "jsoniq/" NEEDS_FILE "${TESTNAME}")
+  IF(NEEDS_FILE)
+    SET(SKIP_TEST 1)
+  ENDIF(NEEDS_FILE)
+  STRING(REGEX MATCH "cloudscript/" NEEDS_FILE "${TESTNAME}")
+  IF(NEEDS_FILE)
+    SET(SKIP_TEST 1)
+  ENDIF(NEEDS_FILE)
 
   IF (TESTNAME MATCHES "^test/rbkt/w3c_testsuite")
     IF (_testdriver_mt_available AND ZORBATEST_USE_MT_XQTS)
@@ -269,11 +267,9 @@
     #EXPECTED_FAILURE (test/rbkt/w3c_testsuite/XQuery/Operators/CompExpr/ValComp/NumericComp/NumericGT/K2-NumericGT-2 867059)
   ENDIF (NOT ZORBA_WITH_BIG_INTEGER)
 
-  IF(ZORBA_WITH_JSON)
-    # These tests fail because of the JSONiq extension which has array constructors.
-    #EXPECTED_FAILURE(test/rbkt/w3c_testsuite/XQuery/Expressions/SeqExpr/FilterExpr/K-FilterExpr-4 3141592)
-    #EXPECTED_FAILURE(test/rbkt/w3c_testsuite/XQuery/Expressions/SeqExpr/FilterExpr/K-FilterExpr-5 3141592)
-  ENDIF(ZORBA_WITH_JSON)
+  # These tests fail because of the JSONiq extension which has array constructors.
+  #EXPECTED_FAILURE(test/rbkt/w3c_testsuite/XQuery/Expressions/SeqExpr/FilterExpr/K-FilterExpr-4 3141592)
+  #EXPECTED_FAILURE(test/rbkt/w3c_testsuite/XQuery/Expressions/SeqExpr/FilterExpr/K-FilterExpr-5 3141592)
 
   IF (ZORBA_TEST_XQUERYX)
 
@@ -589,12 +585,3 @@
 # external variable default expected failures
 EXPECTED_FAILURE(test/rbkt/zorba/ext_var/w3c/extvardef-014 923672) # not possible to set context item for rbkt tests
 EXPECTED_FAILURE(test/rbkt/zorba/ext_var/w3c/extvardef-016 923686)
-
-
-# JSONiq C++-style comments are not yet decided upon, the grammar
-# rules are comment out, so these tests are expected to fail.
-EXPECTED_FAILURE(test/rbkt/zorba/jsoniq/comment_01.jq 0)
-EXPECTED_FAILURE(test/rbkt/zorba/jsoniq/comment_02.jq 0)
-EXPECTED_FAILURE(test/rbkt/zorba/jsoniq/comment_03.jq 0)
-EXPECTED_FAILURE(test/rbkt/zorba/jsoniq/comment_04.jq 0)
-EXPECTED_FAILURE(test/rbkt/zorba/jsoniq/comment_05.jq 0)

=== modified file 'test/rbkt/Scripts/w3c/Readme.txt'
--- test/rbkt/Scripts/w3c/Readme.txt	2013-02-07 17:24:36 +0000
+++ test/rbkt/Scripts/w3c/Readme.txt	2013-06-15 03:00:38 +0000
@@ -19,7 +19,6 @@
     ZORBA_XQUERYX=ON
     ZORBA_TEST_XQUERYX=ON
     ZORBA_TEST_W3C_TO_SUBMIT_RESULTS=ON
-    ZORBA_WITH_JSON=OFF
     
 1.  Import XQTS/XQFTTS.
 

=== modified file 'test/unit/test_static_context.cpp'
--- test/unit/test_static_context.cpp	2013-05-15 16:45:08 +0000
+++ test/unit/test_static_context.cpp	2013-06-15 03:00:38 +0000
@@ -61,11 +61,7 @@
     }
   }
 
-#ifdef ZORBA_WITH_JSON
   return lFooFound && lBindings.size() == 8; // JSONiq has 2 additional NS.
-#else
-  return lFooFound && lBindings.size() == 6;
-#endif
 }
 
 bool

=== modified file 'test/update/Scripts/Readme.txt'
--- test/update/Scripts/Readme.txt	2013-04-25 12:46:35 +0000
+++ test/update/Scripts/Readme.txt	2013-06-15 03:00:38 +0000
@@ -19,7 +19,6 @@
     ZORBA_XQUERYX=ON
     ZORBA_TEST_XQUERYX=ON
     ZORBA_TEST_W3C_TO_SUBMIT_RESULTS=ON
-    ZORBA_WITH_JSON=OFF
    And make sure you are using at least Xerces version 3.1.1.
 
 1.  Import XQUTS.


Follow ups