zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #02631
[Merge] lp:~zorba-coders/zorba/bug_900462 into lp:zorba/data-converters-module
Sorin Marian Nasoi has proposed merging lp:~zorba-coders/zorba/bug_900462 into lp:zorba/data-converters-module.
Requested reviews:
Sorin Marian Nasoi (sorin.marian.nasoi)
Matthias Brantner (matthias-brantner)
Related bugs:
Bug #900462 in Zorba: "json:serialize returns invalid json"
https://bugs.launchpad.net/zorba/+bug/900462
For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug_900462/+merge/84826
Fixed bug #900462 (json:serialize returns invalid json)
--
https://code.launchpad.net/~zorba-coders/zorba/bug_900462/+merge/84826
Your team Zorba Coders is subscribed to branch lp:zorba/data-converters-module.
=== modified file 'src/com/zorba-xquery/www/modules/converters/CMakeLists.txt'
--- src/com/zorba-xquery/www/modules/converters/CMakeLists.txt 2011-12-05 22:42:10 +0000
+++ src/com/zorba-xquery/www/modules/converters/CMakeLists.txt 2011-12-07 18:56:40 +0000
@@ -62,8 +62,6 @@
DECLARE_ZORBA_MODULE (URI "http://www.zorba-xquery.com/modules/converters/json" VERSION 1.0 FILE "json.xq" LINK_LIBRARIES "${Jansson_LIBRARIES}")
ADD_TEST_DIRECTORY ("${PROJECT_SOURCE_DIR}/test_json")
- EXPECTED_FAILURE(zorba_data-converters_module/converters/jansson/serialize_json_18.xq 900462)
-
IF(ZORBA_NO_UNICODE)
SET_TESTS_PROPERTIES(zorba_data-converters_module/converters/jansson/parse_json_03.xq
PROPERTIES WILL_FAIL TRUE)
=== modified file 'src/com/zorba-xquery/www/modules/converters/json.xq.src/jansson_wrapper.cpp'
--- src/com/zorba-xquery/www/modules/converters/json.xq.src/jansson_wrapper.cpp 2011-12-06 14:20:24 +0000
+++ src/com/zorba-xquery/www/modules/converters/json.xq.src/jansson_wrapper.cpp 2011-12-07 18:56:40 +0000
@@ -475,14 +475,11 @@
aResultSs << "[";
serialize_child(aElement, aResultSs, aErrorLogSs, "object");
-
- if(!aErrorLogSs.str().empty())
- {
- if(lType == "object")
- aResultSs << "}";
- else
- aResultSs << "]";
- }
+
+ if(lType == "object")
+ aResultSs << "}";
+ else
+ aResultSs << "]";
}
static void parse_JSON_ML_value(
=== modified file 'test_json/ExpQueryResults/converters/jansson/serialize_json_01.xml.res'
--- test_json/ExpQueryResults/converters/jansson/serialize_json_01.xml.res 2011-05-31 15:21:09 +0000
+++ test_json/ExpQueryResults/converters/jansson/serialize_json_01.xml.res 2011-12-07 18:56:40 +0000
@@ -1,1 +1,1 @@
-{"phoneNumbers": ["212 732-1234", "646 123-4567"], "firstName": "John", "lastName": "Smith", "address": {"postalCode": 10021, "city": "New York", "streetAddress": "21 2nd Street", "state": "NY"}
\ No newline at end of file
+{"phoneNumbers": ["212 732-1234", "646 123-4567"], "firstName": "John", "lastName": "Smith", "address": {"postalCode": 10021, "city": "New York", "streetAddress": "21 2nd Street", "state": "NY"}}
\ No newline at end of file
=== modified file 'test_json/ExpQueryResults/converters/jansson/serialize_json_02.xml.res'
--- test_json/ExpQueryResults/converters/jansson/serialize_json_02.xml.res 2011-05-31 15:21:09 +0000
+++ test_json/ExpQueryResults/converters/jansson/serialize_json_02.xml.res 2011-12-07 18:56:40 +0000
@@ -1,1 +1,1 @@
-[{"phoneNumbers": ["212 732-1234", "646 123-4567"], "firstName": "John", "lastName": "Smith", "address": {"postalCode": 10021, "city": "New York", "streetAddress": "21 2nd Street", "state": "NY"}}, {"phoneNumbers": ["212 732-1234", "646 123-4567"], "firstName": "John", "lastName": "Smith", "address": {"postalCode": 10021, "city": "New York", "streetAddress": "21 2nd Street", "state": "NY"}}
\ No newline at end of file
+[{"phoneNumbers": ["212 732-1234", "646 123-4567"], "firstName": "John", "lastName": "Smith", "address": {"postalCode": 10021, "city": "New York", "streetAddress": "21 2nd Street", "state": "NY"}}, {"phoneNumbers": ["212 732-1234", "646 123-4567"], "firstName": "John", "lastName": "Smith", "address": {"postalCode": 10021, "city": "New York", "streetAddress": "21 2nd Street", "state": "NY"}}]
\ No newline at end of file
=== modified file 'test_json/ExpQueryResults/converters/jansson/serialize_json_04.xml.res'
--- test_json/ExpQueryResults/converters/jansson/serialize_json_04.xml.res 2011-05-31 15:21:09 +0000
+++ test_json/ExpQueryResults/converters/jansson/serialize_json_04.xml.res 2011-12-07 18:56:40 +0000
@@ -1,1 +1,1 @@
-{"firstName": "\""
\ No newline at end of file
+{"firstName": "\""}
\ No newline at end of file
=== modified file 'test_json/ExpQueryResults/converters/jansson/serialize_json_05.xml.res'
--- test_json/ExpQueryResults/converters/jansson/serialize_json_05.xml.res 2011-05-31 15:21:09 +0000
+++ test_json/ExpQueryResults/converters/jansson/serialize_json_05.xml.res 2011-12-07 18:56:40 +0000
@@ -1,1 +1,1 @@
-{"name": "\"\\\/\b\f\n\r\t"
\ No newline at end of file
+{"name": "\"\\\/\b\f\n\r\t"}
\ No newline at end of file
=== modified file 'test_json/ExpQueryResults/converters/jansson/serialize_json_09.xml.res'
--- test_json/ExpQueryResults/converters/jansson/serialize_json_09.xml.res 2011-05-31 15:21:09 +0000
+++ test_json/ExpQueryResults/converters/jansson/serialize_json_09.xml.res 2011-12-07 18:56:40 +0000
@@ -1,1 +1,1 @@
-{"servlet": [["value1"], "value2"]
\ No newline at end of file
+{"servlet": [["value1"], "value2"]}
\ No newline at end of file
=== modified file 'test_json/ExpQueryResults/converters/jansson/serialize_json_13.xml.res'
--- test_json/ExpQueryResults/converters/jansson/serialize_json_13.xml.res 2011-05-31 15:21:09 +0000
+++ test_json/ExpQueryResults/converters/jansson/serialize_json_13.xml.res 2011-12-07 18:56:40 +0000
@@ -1,1 +1,1 @@
-{"servlet": ["value"]
\ No newline at end of file
+{"servlet": ["value"]}
\ No newline at end of file
=== modified file 'test_json/ExpQueryResults/converters/jansson/serialize_json_14.xml.res'
--- test_json/ExpQueryResults/converters/jansson/serialize_json_14.xml.res 2011-05-31 15:21:09 +0000
+++ test_json/ExpQueryResults/converters/jansson/serialize_json_14.xml.res 2011-12-07 18:56:40 +0000
@@ -1,1 +1,1 @@
-{"servlet": {"name": "value"}
\ No newline at end of file
+{"servlet": {"name": "value"}}
\ No newline at end of file
=== modified file 'test_json/ExpQueryResults/converters/jansson/serialize_json_15.xml.res'
--- test_json/ExpQueryResults/converters/jansson/serialize_json_15.xml.res 2011-05-31 15:21:09 +0000
+++ test_json/ExpQueryResults/converters/jansson/serialize_json_15.xml.res 2011-12-07 18:56:40 +0000
@@ -1,1 +1,1 @@
-{"servlet": [{}]
\ No newline at end of file
+{"servlet": [{}]}
\ No newline at end of file
=== modified file 'test_json/ExpQueryResults/converters/jansson/serialize_json_16.xml.res'
--- test_json/ExpQueryResults/converters/jansson/serialize_json_16.xml.res 2011-05-31 15:21:09 +0000
+++ test_json/ExpQueryResults/converters/jansson/serialize_json_16.xml.res 2011-12-07 18:56:40 +0000
@@ -1,1 +1,1 @@
-{"servlet": [["212 732-1234"]]
\ No newline at end of file
+{"servlet": [["212 732-1234"]]}
\ No newline at end of file
Follow ups