Convert json-xml module to use JSONiq items
Bug #1200090 reported by
Chris Hillery
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zorba |
Fix Committed
|
Medium
|
Paul J. Lucas |
Bug Description
The old "converters/json" module has been updated to be named "json-xml". However it still behaves the same way - converts between a couple different XDM forms (JsonML, Snelson) and JSON text. It would make more sense now for the inputs and outputs to be json-item()s instead:
declare function jx:xml-to-json($xml as item()*, $options as object()) as json-item()*
declare function jx:json-
(I'm not sure whether those should be json-item()* or just json-item() .)
Related branches
lp:~zorba-coders/zorba/bug-1200090
- Matthias Brantner: Approve
- Paul J. Lucas: Approve
-
Diff: 5076 lines (+1674/-1725)192 files modifiedChangeLog (+1/-0)
include/zorba/pregenerated/diagnostic_list.h (+10/-10)
modules/json/json-xml.xq (+127/-145)
modules/pregenerated/zorba-errors.xq (+8/-8)
src/diagnostics/diagnostic_en.xml (+57/-40)
src/diagnostics/pregenerated/diagnostic_list.cpp (+14/-14)
src/diagnostics/pregenerated/dict_en.cpp (+10/-5)
src/diagnostics/pregenerated/dict_zed_keys.h (+5/-0)
src/functions/pregenerated/func_json.cpp (+5/-5)
src/runtime/json/common.cpp (+1/-1)
src/runtime/json/common.h (+47/-22)
src/runtime/json/json_impl.cpp (+30/-144)
src/runtime/json/jsonml_array.cpp (+215/-233)
src/runtime/json/jsonml_array.h (+2/-3)
src/runtime/json/snelson.cpp (+585/-356)
src/runtime/json/snelson.h (+2/-3)
src/runtime/spec/json/json.xml (+12/-23)
src/store/api/item.h (+6/-1)
src/store/naive/item.cpp (+17/-0)
test/rbkt/ExpQueryResults/zorba/json/json-jmla-j2x-01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/json/json-jmla-j2x-02.xml.res (+4/-0)
test/rbkt/ExpQueryResults/zorba/json/json-jmla-j2x-03.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/json/json-jmla-j2x-04.xml.res (+5/-0)
test/rbkt/ExpQueryResults/zorba/json/json-jmla-j2x-05.xml.res (+14/-0)
test/rbkt/ExpQueryResults/zorba/json/json-jmla-j2x-wikipedia.xml.res (+10/-0)
test/rbkt/ExpQueryResults/zorba/json/json-jmla-x2j-01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/json/json-jmla-x2j-02.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/json/json-jmla-x2j-03.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/json/json-jmla-x2j-wikipedia.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/json/json-jsonml_array-parse-01.xml.res (+0/-1)
test/rbkt/ExpQueryResults/zorba/json/json-jsonml_array-parse-02.xml.res (+0/-4)
test/rbkt/ExpQueryResults/zorba/json/json-jsonml_array-parse-03.xml.res (+0/-1)
test/rbkt/ExpQueryResults/zorba/json/json-jsonml_array-parse-04.xml.res (+0/-7)
test/rbkt/ExpQueryResults/zorba/json/json-jsonml_array-parse-05.xml.res (+0/-1)
test/rbkt/ExpQueryResults/zorba/json/json-jsonml_array-parse-wikipedia.xml.res (+0/-10)
test/rbkt/ExpQueryResults/zorba/json/json-jsonml_array-serialize-01.xml.res (+0/-1)
test/rbkt/ExpQueryResults/zorba/json/json-jsonml_array-serialize-02.xml.res (+0/-1)
test/rbkt/ExpQueryResults/zorba/json/json-jsonml_array-serialize-03.xml.res (+0/-1)
test/rbkt/ExpQueryResults/zorba/json/json-jsonml_array-serialize-indent-wikipedia.xml.res (+0/-11)
test/rbkt/ExpQueryResults/zorba/json/json-jsonml_array-serialize-none-wikipedia.xml.res (+0/-1)
test/rbkt/ExpQueryResults/zorba/json/json-jsonml_array-serialize-some-wikipedia.xml.res (+0/-1)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-j2x-array-01.xml.res (+3/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-j2x-array-02.xml.res (+3/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-j2x-array-03.xml.res (+3/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-j2x-array-04.xml.res (+3/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-j2x-array-05.xml.res (+4/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-j2x-array-06.xml.res (+8/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-j2x-array-07.xml.res (+10/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-j2x-array-08.xml.res (+6/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-j2x-example.xml.res (+14/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-j2x-numbers.xml.res (+5/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-j2x-object-01.xml.res (+3/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-j2x-object-02.xml.res (+4/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-j2x-object-03.xml.res (+8/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-j2x-object-04.xml.res (+6/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-j2x-object-05.xml.res (+3/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-j2x-utf8-01.xml.res (+3/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-parse-array-01.xml.res (+0/-3)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-parse-array-02.xml.res (+0/-3)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-parse-array-03.xml.res (+0/-3)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-parse-array-04.xml.res (+0/-3)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-parse-array-05.xml.res (+0/-4)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-parse-array-06.xml.res (+0/-8)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-parse-array-07.xml.res (+0/-10)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-parse-array-08.xml.res (+0/-6)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-parse-example.xml.res (+0/-14)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-parse-numbers.xml.res (+0/-5)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-parse-object-01.xml.res (+0/-3)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-parse-object-02.xml.res (+0/-4)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-parse-object-03.xml.res (+0/-8)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-parse-object-04.xml.res (+0/-6)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-parse-object-05.xml.res (+0/-3)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-parse-serialize.xml.res (+0/-3)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-parse-uncommon-chars.xml.res (+0/-3)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-parse-utf8-01.xml.res (+0/-3)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-serialize-indent-example.xml.res (+0/-11)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-serialize-none-example.xml.res (+0/-1)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-serialize-parse.xml.res (+0/-1)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-serialize-some-example.xml.res (+0/-1)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-x2j-array-01.xml.res (+1/-1)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-x2j-array-02.xml.res (+1/-1)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-x2j-array-03.xml.res (+1/-1)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-x2j-array-04.xml.res (+1/-1)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-x2j-array-05.xml.res (+1/-1)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-x2j-array-12.xml.res (+1/-1)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-x2j-object-01.xml.res (+1/-1)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-x2j-object-02.xml.res (+1/-1)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-x2j-object-03.xml.res (+1/-1)
test/rbkt/Queries/zorba/error/data-location-json-2.xq (+2/-2)
test/rbkt/Queries/zorba/json/json-invalid-option-parameter.xq (+3/-2)
test/rbkt/Queries/zorba/json/json-jmla-j2x-01.xq (+9/-0)
test/rbkt/Queries/zorba/json/json-jmla-j2x-02.xq (+13/-0)
test/rbkt/Queries/zorba/json/json-jmla-j2x-03.xq (+17/-0)
test/rbkt/Queries/zorba/json/json-jmla-j2x-04.spec (+1/-0)
test/rbkt/Queries/zorba/json/json-jmla-j2x-04.xq (+27/-0)
test/rbkt/Queries/zorba/json/json-jmla-j2x-05.spec (+1/-0)
test/rbkt/Queries/zorba/json/json-jmla-j2x-05.xq (+70/-0)
test/rbkt/Queries/zorba/json/json-jmla-j2x-06.spec (+1/-0)
test/rbkt/Queries/zorba/json/json-jmla-j2x-06.xq (+9/-0)
test/rbkt/Queries/zorba/json/json-jmla-j2x-07.spec (+1/-0)
test/rbkt/Queries/zorba/json/json-jmla-j2x-07.xq (+7/-0)
test/rbkt/Queries/zorba/json/json-jmla-j2x-08.spec (+1/-0)
test/rbkt/Queries/zorba/json/json-jmla-j2x-08.xq (+7/-0)
test/rbkt/Queries/zorba/json/json-jmla-j2x-wikipedia.xq (+20/-0)
test/rbkt/Queries/zorba/json/json-jmla-x2j-01.xq (+7/-0)
test/rbkt/Queries/zorba/json/json-jmla-x2j-02.xq (+11/-0)
test/rbkt/Queries/zorba/json/json-jmla-x2j-03.xq (+8/-0)
test/rbkt/Queries/zorba/json/json-jmla-x2j-wikipedia.xq (+17/-0)
test/rbkt/Queries/zorba/json/json-jsonml_array-parse-01.xq (+0/-7)
test/rbkt/Queries/zorba/json/json-jsonml_array-parse-02.xq (+0/-12)
test/rbkt/Queries/zorba/json/json-jsonml_array-parse-03.xq (+0/-16)
test/rbkt/Queries/zorba/json/json-jsonml_array-parse-04.xq (+0/-27)
test/rbkt/Queries/zorba/json/json-jsonml_array-parse-05.xq (+0/-65)
test/rbkt/Queries/zorba/json/json-jsonml_array-parse-06.spec (+0/-1)
test/rbkt/Queries/zorba/json/json-jsonml_array-parse-06.xq (+0/-8)
test/rbkt/Queries/zorba/json/json-jsonml_array-parse-07.spec (+0/-1)
test/rbkt/Queries/zorba/json/json-jsonml_array-parse-07.xq (+0/-11)
test/rbkt/Queries/zorba/json/json-jsonml_array-parse-08.spec (+0/-1)
test/rbkt/Queries/zorba/json/json-jsonml_array-parse-08.xq (+0/-8)
test/rbkt/Queries/zorba/json/json-jsonml_array-parse-wikipedia.xq (+0/-21)
test/rbkt/Queries/zorba/json/json-jsonml_array-serialize-01.xq (+0/-8)
test/rbkt/Queries/zorba/json/json-jsonml_array-serialize-02.xq (+0/-11)
test/rbkt/Queries/zorba/json/json-jsonml_array-serialize-03.xq (+0/-8)
test/rbkt/Queries/zorba/json/json-jsonml_array-serialize-indent-wikipedia.xq (+0/-17)
test/rbkt/Queries/zorba/json/json-jsonml_array-serialize-none-wikipedia.xq (+0/-17)
test/rbkt/Queries/zorba/json/json-jsonml_array-serialize-some-wikipedia.xq (+0/-17)
test/rbkt/Queries/zorba/json/json-snelson-invalid-json.spec (+0/-1)
test/rbkt/Queries/zorba/json/json-snelson-invalid-json.xq (+0/-9)
test/rbkt/Queries/zorba/json/json-snelson-j2x-array-01.xq (+6/-0)
test/rbkt/Queries/zorba/json/json-snelson-j2x-array-02.xq (+6/-0)
test/rbkt/Queries/zorba/json/json-snelson-j2x-array-03.xq (+6/-0)
test/rbkt/Queries/zorba/json/json-snelson-j2x-array-04.xq (+6/-0)
test/rbkt/Queries/zorba/json/json-snelson-j2x-array-05.xq (+6/-0)
test/rbkt/Queries/zorba/json/json-snelson-j2x-array-06.xq (+6/-0)
test/rbkt/Queries/zorba/json/json-snelson-j2x-array-07.xq (+6/-0)
test/rbkt/Queries/zorba/json/json-snelson-j2x-array-08.xq (+6/-0)
test/rbkt/Queries/zorba/json/json-snelson-j2x-example.xq (+20/-0)
test/rbkt/Queries/zorba/json/json-snelson-j2x-numbers.xq (+10/-0)
test/rbkt/Queries/zorba/json/json-snelson-j2x-object-01.xq (+6/-0)
test/rbkt/Queries/zorba/json/json-snelson-j2x-object-02.xq (+6/-0)
test/rbkt/Queries/zorba/json/json-snelson-j2x-object-03.xq (+6/-0)
test/rbkt/Queries/zorba/json/json-snelson-j2x-object-04.xq (+10/-0)
test/rbkt/Queries/zorba/json/json-snelson-j2x-object-05.xq (+6/-0)
test/rbkt/Queries/zorba/json/json-snelson-j2x-utf8-01.xq (+6/-0)
test/rbkt/Queries/zorba/json/json-snelson-parse-array-01.xq (+0/-6)
test/rbkt/Queries/zorba/json/json-snelson-parse-array-02.xq (+0/-6)
test/rbkt/Queries/zorba/json/json-snelson-parse-array-03.xq (+0/-6)
test/rbkt/Queries/zorba/json/json-snelson-parse-array-04.xq (+0/-6)
test/rbkt/Queries/zorba/json/json-snelson-parse-array-05.xq (+0/-6)
test/rbkt/Queries/zorba/json/json-snelson-parse-array-06.xq (+0/-7)
test/rbkt/Queries/zorba/json/json-snelson-parse-array-07.xq (+0/-7)
test/rbkt/Queries/zorba/json/json-snelson-parse-array-08.xq (+0/-7)
test/rbkt/Queries/zorba/json/json-snelson-parse-empty.spec (+0/-1)
test/rbkt/Queries/zorba/json/json-snelson-parse-empty.xq (+0/-7)
test/rbkt/Queries/zorba/json/json-snelson-parse-example.xq (+0/-21)
test/rbkt/Queries/zorba/json/json-snelson-parse-numbers.xq (+0/-11)
test/rbkt/Queries/zorba/json/json-snelson-parse-object-01.xq (+0/-6)
test/rbkt/Queries/zorba/json/json-snelson-parse-object-02.xq (+0/-6)
test/rbkt/Queries/zorba/json/json-snelson-parse-object-03.xq (+0/-7)
test/rbkt/Queries/zorba/json/json-snelson-parse-object-04.xq (+0/-12)
test/rbkt/Queries/zorba/json/json-snelson-parse-object-05.xq (+0/-7)
test/rbkt/Queries/zorba/json/json-snelson-parse-serialize.xq (+0/-10)
test/rbkt/Queries/zorba/json/json-snelson-parse-uncommon-chars.xq (+0/-7)
test/rbkt/Queries/zorba/json/json-snelson-parse-utf8-01.xq (+0/-5)
test/rbkt/Queries/zorba/json/json-snelson-serialize-comment-node.spec (+0/-1)
test/rbkt/Queries/zorba/json/json-snelson-serialize-comment-node.xq (+0/-6)
test/rbkt/Queries/zorba/json/json-snelson-serialize-indent-example.xq (+0/-21)
test/rbkt/Queries/zorba/json/json-snelson-serialize-invalid-value-for-attribute.spec (+0/-1)
test/rbkt/Queries/zorba/json/json-snelson-serialize-invalid-value-for-attribute.xq (+0/-9)
test/rbkt/Queries/zorba/json/json-snelson-serialize-none-example.xq (+0/-20)
test/rbkt/Queries/zorba/json/json-snelson-serialize-parse.xq (+0/-7)
test/rbkt/Queries/zorba/json/json-snelson-serialize-some-example.xq (+0/-21)
test/rbkt/Queries/zorba/json/json-snelson-serialize-type-value-missing.spec (+0/-1)
test/rbkt/Queries/zorba/json/json-snelson-serialize-type-value-missing.xq (+0/-9)
test/rbkt/Queries/zorba/json/json-snelson-x2j-array-01.xq (+2/-2)
test/rbkt/Queries/zorba/json/json-snelson-x2j-array-02.xq (+2/-2)
test/rbkt/Queries/zorba/json/json-snelson-x2j-array-03.xq (+2/-2)
test/rbkt/Queries/zorba/json/json-snelson-x2j-array-04.xq (+2/-2)
test/rbkt/Queries/zorba/json/json-snelson-x2j-array-05.xq (+2/-2)
test/rbkt/Queries/zorba/json/json-snelson-x2j-array-06.spec (+1/-1)
test/rbkt/Queries/zorba/json/json-snelson-x2j-array-06.xq (+2/-2)
test/rbkt/Queries/zorba/json/json-snelson-x2j-array-07.xq (+2/-2)
test/rbkt/Queries/zorba/json/json-snelson-x2j-array-08.xq (+2/-2)
test/rbkt/Queries/zorba/json/json-snelson-x2j-array-09.xq (+2/-2)
test/rbkt/Queries/zorba/json/json-snelson-x2j-array-10.spec (+1/-1)
test/rbkt/Queries/zorba/json/json-snelson-x2j-array-10.xq (+2/-2)
test/rbkt/Queries/zorba/json/json-snelson-x2j-array-11.spec (+1/-1)
test/rbkt/Queries/zorba/json/json-snelson-x2j-array-11.xq (+2/-2)
test/rbkt/Queries/zorba/json/json-snelson-x2j-array-12.xq (+3/-5)
test/rbkt/Queries/zorba/json/json-snelson-x2j-object-01.xq (+2/-2)
test/rbkt/Queries/zorba/json/json-snelson-x2j-object-02.xq (+2/-2)
test/rbkt/Queries/zorba/json/json-snelson-x2j-object-03.xq (+4/-6)
Changed in zorba: | |
status: | Confirmed → In Progress |
Changed in zorba: | |
status: | In Progress → Fix Committed |
To post a comment you must log in.
As discussed on the conf call, assigning to Paul to get his opinion on how large a task this would be. He would be the most reasonable person to implement this as well. Subscribing Ghislain so he can register his opinion on the exact API.