diff --git a/com.ibm.streamsx.json/impl/include/JsonReader.h b/com.ibm.streamsx.json/impl/include/JsonReader.h index e86e902..9e3cbb7 100644 --- a/com.ibm.streamsx.json/impl/include/JsonReader.h +++ b/com.ibm.streamsx.json/impl/include/JsonReader.h @@ -1080,6 +1080,14 @@ namespace com { namespace ibm { namespace streamsx { namespace json { if(!value) status = 4; else if(value->IsNull()) status = 3; + else if(value->IsObject()) { + // Return json string if value is an object + status = 0; + rapidjson::StringBuffer str; + rapidjson::Writer writer(str); + value->Accept(writer); + return SPL::rstring(str.GetString()); + } else { try { switch (value->GetType()) { @@ -1216,4 +1224,3 @@ namespace com { namespace ibm { namespace streamsx { namespace json { }}}} /* JSON_READER_H_ */ - diff --git a/com.ibm.streamsx.json/impl/java/src/com/ibm/streamsx/json/JsonMessages_de_DE.properties b/com.ibm.streamsx.json/impl/java/src/com/ibm/streamsx/json/JsonMessages_de_DE.properties old mode 100755 new mode 100644 diff --git a/com.ibm.streamsx.json/impl/java/src/com/ibm/streamsx/json/JsonMessages_es_ES.properties b/com.ibm.streamsx.json/impl/java/src/com/ibm/streamsx/json/JsonMessages_es_ES.properties old mode 100755 new mode 100644 index 06a7d84..b3e4a8b --- a/com.ibm.streamsx.json/impl/java/src/com/ibm/streamsx/json/JsonMessages_es_ES.properties +++ b/com.ibm.streamsx.json/impl/java/src/com/ibm/streamsx/json/JsonMessages_es_ES.properties @@ -1,5 +1,5 @@ # NLS_MESSAGEFORMAT_VAR # NLS_ENCODING=UNICODE SPECIFY_FILE_CONTAINING_JSON=CDIST0950E Especifique un archivo que contenga una serie JSON. -UNABLE_TO_GENERATE_SPL_TYPES=CDIST0951E No se han podido generar tipos SPL +UNABLE_TO_GENERATE_SPL_TYPES=CDIST0951E No se han podido generar los tipos SPL UNSUPPORTED_TYPE=CDIST0952E Tipo no soportado: diff --git a/com.ibm.streamsx.json/impl/java/src/com/ibm/streamsx/json/JsonMessages_fr_FR.properties b/com.ibm.streamsx.json/impl/java/src/com/ibm/streamsx/json/JsonMessages_fr_FR.properties old mode 100755 new mode 100644 diff --git a/com.ibm.streamsx.json/impl/java/src/com/ibm/streamsx/json/JsonMessages_it_IT.properties b/com.ibm.streamsx.json/impl/java/src/com/ibm/streamsx/json/JsonMessages_it_IT.properties old mode 100755 new mode 100644 diff --git a/com.ibm.streamsx.json/impl/java/src/com/ibm/streamsx/json/JsonMessages_ja_JP.properties b/com.ibm.streamsx.json/impl/java/src/com/ibm/streamsx/json/JsonMessages_ja_JP.properties old mode 100755 new mode 100644 diff --git a/com.ibm.streamsx.json/impl/java/src/com/ibm/streamsx/json/JsonMessages_pt_BR.properties b/com.ibm.streamsx.json/impl/java/src/com/ibm/streamsx/json/JsonMessages_pt_BR.properties old mode 100755 new mode 100644 diff --git a/com.ibm.streamsx.json/impl/java/src/com/ibm/streamsx/json/JsonMessages_zh_CN.properties b/com.ibm.streamsx.json/impl/java/src/com/ibm/streamsx/json/JsonMessages_zh_CN.properties old mode 100755 new mode 100644 diff --git a/com.ibm.streamsx.json/impl/java/src/com/ibm/streamsx/json/JsonMessages_zh_TW.properties b/com.ibm.streamsx.json/impl/java/src/com/ibm/streamsx/json/JsonMessages_zh_TW.properties old mode 100755 new mode 100644 diff --git a/com.ibm.streamsx.json/impl/java/src/com/ibm/streamsx/json/converters/JsonConverterMessages_de_DE.properties b/com.ibm.streamsx.json/impl/java/src/com/ibm/streamsx/json/converters/JsonConverterMessages_de_DE.properties old mode 100755 new mode 100644 diff --git a/com.ibm.streamsx.json/impl/java/src/com/ibm/streamsx/json/converters/JsonConverterMessages_es_ES.properties b/com.ibm.streamsx.json/impl/java/src/com/ibm/streamsx/json/converters/JsonConverterMessages_es_ES.properties old mode 100755 new mode 100644 index 33f4b49..baaf42b --- a/com.ibm.streamsx.json/impl/java/src/com/ibm/streamsx/json/converters/JsonConverterMessages_es_ES.properties +++ b/com.ibm.streamsx.json/impl/java/src/com/ibm/streamsx/json/converters/JsonConverterMessages_es_ES.properties @@ -1,6 +1,6 @@ # NLS_MESSAGEFORMAT_VAR # NLS_ENCODING=UNICODE -UNHANDLED_ARRAY_TYPE=CDIST0953E Tipo de matriz no gestionado: {0} +UNHANDLED_ARRAY_TYPE=CDIST0953E Tipo de matriz no manejado: {0} ATTRIBUTE_MUST_BE_SPECIFIED=CDIST0954E Se debe especificar el atributo {0} ATTRIBUTE_MUST_BE_OF_TYPES=CDIST0955E El atributo {0} debe ser uno de los tipos siguientes: {1} diff --git a/com.ibm.streamsx.json/impl/java/src/com/ibm/streamsx/json/converters/JsonConverterMessages_fr_FR.properties b/com.ibm.streamsx.json/impl/java/src/com/ibm/streamsx/json/converters/JsonConverterMessages_fr_FR.properties old mode 100755 new mode 100644 diff --git a/com.ibm.streamsx.json/impl/java/src/com/ibm/streamsx/json/converters/JsonConverterMessages_it_IT.properties b/com.ibm.streamsx.json/impl/java/src/com/ibm/streamsx/json/converters/JsonConverterMessages_it_IT.properties old mode 100755 new mode 100644 diff --git a/com.ibm.streamsx.json/impl/java/src/com/ibm/streamsx/json/converters/JsonConverterMessages_ja_JP.properties b/com.ibm.streamsx.json/impl/java/src/com/ibm/streamsx/json/converters/JsonConverterMessages_ja_JP.properties old mode 100755 new mode 100644 diff --git a/com.ibm.streamsx.json/impl/java/src/com/ibm/streamsx/json/converters/JsonConverterMessages_pt_BR.properties b/com.ibm.streamsx.json/impl/java/src/com/ibm/streamsx/json/converters/JsonConverterMessages_pt_BR.properties old mode 100755 new mode 100644 diff --git a/com.ibm.streamsx.json/impl/java/src/com/ibm/streamsx/json/converters/JsonConverterMessages_zh_CN.properties b/com.ibm.streamsx.json/impl/java/src/com/ibm/streamsx/json/converters/JsonConverterMessages_zh_CN.properties old mode 100755 new mode 100644 diff --git a/com.ibm.streamsx.json/impl/java/src/com/ibm/streamsx/json/converters/JsonConverterMessages_zh_TW.properties b/com.ibm.streamsx.json/impl/java/src/com/ibm/streamsx/json/converters/JsonConverterMessages_zh_TW.properties old mode 100755 new mode 100644 diff --git a/com.ibm.streamsx.json/impl/nl/de_DE/JSONResource.xlf b/com.ibm.streamsx.json/impl/nl/de_DE/JSONResource.xlf old mode 100755 new mode 100644 index 57091fe..458d528 --- a/com.ibm.streamsx.json/impl/nl/de_DE/JSONResource.xlf +++ b/com.ibm.streamsx.json/impl/nl/de_DE/JSONResource.xlf @@ -1,17 +1,6 @@ - - - - - - - - - - - - - + + diff --git a/com.ibm.streamsx.json/impl/nl/es_ES/JSONResource.xlf b/com.ibm.streamsx.json/impl/nl/es_ES/JSONResource.xlf old mode 100755 new mode 100644 index e2690f5..572b623 --- a/com.ibm.streamsx.json/impl/nl/es_ES/JSONResource.xlf +++ b/com.ibm.streamsx.json/impl/nl/es_ES/JSONResource.xlf @@ -1,17 +1,6 @@ - - - - - - - - - - - - - + + diff --git a/com.ibm.streamsx.json/impl/nl/fr_FR/JSONResource.xlf b/com.ibm.streamsx.json/impl/nl/fr_FR/JSONResource.xlf index 22f882c..af6a948 100755 --- a/com.ibm.streamsx.json/impl/nl/fr_FR/JSONResource.xlf +++ b/com.ibm.streamsx.json/impl/nl/fr_FR/JSONResource.xlf @@ -1,17 +1,6 @@ - - - - - - - - - - - - - + + diff --git a/com.ibm.streamsx.json/impl/nl/it_IT/JSONResource.xlf b/com.ibm.streamsx.json/impl/nl/it_IT/JSONResource.xlf old mode 100755 new mode 100644 index 139eb9e..82d3a9f --- a/com.ibm.streamsx.json/impl/nl/it_IT/JSONResource.xlf +++ b/com.ibm.streamsx.json/impl/nl/it_IT/JSONResource.xlf @@ -1,17 +1,6 @@ - - - - - - - - - - - - - + + diff --git a/com.ibm.streamsx.json/impl/nl/ja_JP/JSONResource.xlf b/com.ibm.streamsx.json/impl/nl/ja_JP/JSONResource.xlf old mode 100755 new mode 100644 index 142875d..6b7edb0 --- a/com.ibm.streamsx.json/impl/nl/ja_JP/JSONResource.xlf +++ b/com.ibm.streamsx.json/impl/nl/ja_JP/JSONResource.xlf @@ -1,17 +1,6 @@ - - - - - - - - - - - - - + + diff --git a/com.ibm.streamsx.json/impl/nl/pt_BR/JSONResource.xlf b/com.ibm.streamsx.json/impl/nl/pt_BR/JSONResource.xlf old mode 100755 new mode 100644 index 90965b9..fb522d8 --- a/com.ibm.streamsx.json/impl/nl/pt_BR/JSONResource.xlf +++ b/com.ibm.streamsx.json/impl/nl/pt_BR/JSONResource.xlf @@ -1,17 +1,6 @@ - - - - - - - - - - - - - + + diff --git a/com.ibm.streamsx.json/impl/nl/zh_CN/JSONResource.xlf b/com.ibm.streamsx.json/impl/nl/zh_CN/JSONResource.xlf old mode 100755 new mode 100644 index e538139..459c7e5 --- a/com.ibm.streamsx.json/impl/nl/zh_CN/JSONResource.xlf +++ b/com.ibm.streamsx.json/impl/nl/zh_CN/JSONResource.xlf @@ -1,17 +1,6 @@ - - - - - - - - - - - - - + + diff --git a/com.ibm.streamsx.json/impl/nl/zh_TW/JSONResource.xlf b/com.ibm.streamsx.json/impl/nl/zh_TW/JSONResource.xlf old mode 100755 new mode 100644 index 1714575..cbf2535 --- a/com.ibm.streamsx.json/impl/nl/zh_TW/JSONResource.xlf +++ b/com.ibm.streamsx.json/impl/nl/zh_TW/JSONResource.xlf @@ -1,17 +1,6 @@ - - - - - - - - - - - - - + + diff --git a/com.ibm.streamsx.json/info.xml b/com.ibm.streamsx.json/info.xml index f0d3eb5..6e4f0b7 100644 --- a/com.ibm.streamsx.json/info.xml +++ b/com.ibm.streamsx.json/info.xml @@ -30,7 +30,7 @@ them subscribe to the stream of JSON objects. The toolkit supports optional types. For detailed information have a look at the separate items of this toolkit. - 1.5.1 + 1.5.3 4.3.0 diff --git a/samples/JSONToTupleConvert/com.ibm.streamsx.json.sample.jtot/SimpleConversion.spl b/samples/JSONToTupleConvert/com.ibm.streamsx.json.sample.jtot/SimpleConversion.spl index 4260467..9afd07e 100644 --- a/samples/JSONToTupleConvert/com.ibm.streamsx.json.sample.jtot/SimpleConversion.spl +++ b/samples/JSONToTupleConvert/com.ibm.streamsx.json.sample.jtot/SimpleConversion.spl @@ -28,7 +28,7 @@ public composite SimpleJsonConvert { //Read and parse the json into a SPL tuple //Note that the [JSONTuTuple] operator will match the tuple attributes //to their respective JSON ones. Attribute names have to match exactly - stream ParsedS = JSONToTuple(JsonS) { + stream ParsedS = JSONToTuple(JsonS) { } () as SinkOp = Custom(ParsedS) {