Merge lp:~zorba-coders/zorba/bug_900462 into lp:~zorba-coders/zorba/data-converters-module

Proposed by Sorin Marian Nasoi
Status: Merged
Approved by: Matthias Brantner
Approved revision: 78
Merged at revision: 77
Proposed branch: lp:~zorba-coders/zorba/bug_900462
Merge into: lp:~zorba-coders/zorba/data-converters-module
Diff against target: 117 lines (+14/-19)
11 files modified
src/com/zorba-xquery/www/modules/converters/CMakeLists.txt (+0/-2)
src/com/zorba-xquery/www/modules/converters/json.xq.src/jansson_wrapper.cpp (+5/-8)
test_json/ExpQueryResults/converters/jansson/serialize_json_01.xml.res (+1/-1)
test_json/ExpQueryResults/converters/jansson/serialize_json_02.xml.res (+1/-1)
test_json/ExpQueryResults/converters/jansson/serialize_json_04.xml.res (+1/-1)
test_json/ExpQueryResults/converters/jansson/serialize_json_05.xml.res (+1/-1)
test_json/ExpQueryResults/converters/jansson/serialize_json_09.xml.res (+1/-1)
test_json/ExpQueryResults/converters/jansson/serialize_json_13.xml.res (+1/-1)
test_json/ExpQueryResults/converters/jansson/serialize_json_14.xml.res (+1/-1)
test_json/ExpQueryResults/converters/jansson/serialize_json_15.xml.res (+1/-1)
test_json/ExpQueryResults/converters/jansson/serialize_json_16.xml.res (+1/-1)
To merge this branch: bzr merge lp:~zorba-coders/zorba/bug_900462
Reviewer Review Type Date Requested Status
Matthias Brantner Approve
Sorin Marian Nasoi Approve
Review via email: mp+84826@code.launchpad.net

Commit message

Fixed bug #900462 (json:serialize returns invalid json)

Description of the change

Fixed bug #900462 (json:serialize returns invalid json)

To post a comment you must log in.
Revision history for this message
Sorin Marian Nasoi (sorin.marian.nasoi) :
review: Approve
Revision history for this message
Matthias Brantner (matthias-brantner) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job bug_900462-2011-12-07T19-04-45.45Z is finished. The final status was:

All tests succeeded!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== 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 @@
62 DECLARE_ZORBA_MODULE (URI "http://www.zorba-xquery.com/modules/converters/json" VERSION 1.0 FILE "json.xq" LINK_LIBRARIES "${Jansson_LIBRARIES}")62 DECLARE_ZORBA_MODULE (URI "http://www.zorba-xquery.com/modules/converters/json" VERSION 1.0 FILE "json.xq" LINK_LIBRARIES "${Jansson_LIBRARIES}")
63 ADD_TEST_DIRECTORY ("${PROJECT_SOURCE_DIR}/test_json")63 ADD_TEST_DIRECTORY ("${PROJECT_SOURCE_DIR}/test_json")
6464
65 EXPECTED_FAILURE(zorba_data-converters_module/converters/jansson/serialize_json_18.xq 900462)
66
67 IF(ZORBA_NO_UNICODE)65 IF(ZORBA_NO_UNICODE)
68 SET_TESTS_PROPERTIES(zorba_data-converters_module/converters/jansson/parse_json_03.xq66 SET_TESTS_PROPERTIES(zorba_data-converters_module/converters/jansson/parse_json_03.xq
69 PROPERTIES WILL_FAIL TRUE)67 PROPERTIES WILL_FAIL TRUE)
7068
=== 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 @@
475 aResultSs << "[";475 aResultSs << "[";
476476
477 serialize_child(aElement, aResultSs, aErrorLogSs, "object");477 serialize_child(aElement, aResultSs, aErrorLogSs, "object");
478478
479 if(!aErrorLogSs.str().empty())479 if(lType == "object")
480 {480 aResultSs << "}";
481 if(lType == "object")481 else
482 aResultSs << "}";482 aResultSs << "]";
483 else
484 aResultSs << "]";
485 }
486}483}
487484
488static void parse_JSON_ML_value(485static void parse_JSON_ML_value(
489486
=== 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 @@
1{"phoneNumbers": ["212 732-1234", "646 123-4567"], "firstName": "John", "lastName": "Smith", "address": {"postalCode": 10021, "city": "New York", "streetAddress": "21 2nd Street", "state": "NY"}
2\ No newline at end of file1\ No newline at end of file
2{"phoneNumbers": ["212 732-1234", "646 123-4567"], "firstName": "John", "lastName": "Smith", "address": {"postalCode": 10021, "city": "New York", "streetAddress": "21 2nd Street", "state": "NY"}}
3\ No newline at end of file3\ No newline at end of file
44
=== 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 @@
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"}}
2\ No newline at end of file1\ No newline at end of file
2[{"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"}}]
3\ No newline at end of file3\ No newline at end of file
44
=== 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 @@
1{"firstName": "\""
2\ No newline at end of file1\ No newline at end of file
2{"firstName": "\""}
3\ No newline at end of file3\ No newline at end of file
44
=== 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 @@
1{"name": "\"\\\/\b\f\n\r\t"
2\ No newline at end of file1\ No newline at end of file
2{"name": "\"\\\/\b\f\n\r\t"}
3\ No newline at end of file3\ No newline at end of file
44
=== 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 @@
1{"servlet": [["value1"], "value2"]
2\ No newline at end of file1\ No newline at end of file
2{"servlet": [["value1"], "value2"]}
3\ No newline at end of file3\ No newline at end of file
44
=== 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 @@
1{"servlet": ["value"]
2\ No newline at end of file1\ No newline at end of file
2{"servlet": ["value"]}
3\ No newline at end of file3\ No newline at end of file
44
=== 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 @@
1{"servlet": {"name": "value"}
2\ No newline at end of file1\ No newline at end of file
2{"servlet": {"name": "value"}}
3\ No newline at end of file3\ No newline at end of file
44
=== 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 @@
1{"servlet": [{}]
2\ No newline at end of file1\ No newline at end of file
2{"servlet": [{}]}
3\ No newline at end of file3\ No newline at end of file
44
=== 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 @@
1{"servlet": [["212 732-1234"]]
2\ No newline at end of file1\ No newline at end of file
2{"servlet": [["212 732-1234"]]}
3\ No newline at end of file3\ No newline at end of file

Subscribers

People subscribed via source and target branches

to all changes: