JsonML serialization not escaping characters
Bug #878508 reported by
Carlos Manuel Lopez
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zorba |
Fix Released
|
High
|
Paul J. Lucas |
Bug Description
The module doesn't convert escaped characters as you would expect. You instead get a string containing the string with it's unescaped value. A conversion needs to be implemented, something such as:
JSON <-> XML
\" <-> "
\\ <-> \
\/ <-> /
\b <-> 
\f <-> 
\n <-> *actual newline*
\r <-> *actual carriage return*
\t <-> ' '
\u$$$$<-> &#x$$$$; or #$$$$$; with the correct hex-decimal conversion
< <-> <
> <-> >
& <-> &
' <-> '
This proposition might create a regresion related to bug #866757.
Related branches
lp:~zorba-coders/zorba/bug-878508
- Chris Hillery: Approve
- Paul J. Lucas: Approve
-
Diff: 359 lines (+169/-65)9 files modifiedChangeLog (+1/-0)
src/api/serialization/serializer.cpp (+2/-42)
src/runtime/json/jsonml_array.cpp (+3/-2)
src/runtime/json/snelson.cpp (+5/-18)
src/util/CMakeLists.txt (+1/-0)
src/util/json_util.cpp (+85/-0)
src/util/json_util.h (+72/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/supplemental_plane.xml.res (+0/-1)
test/rbkt/Queries/zorba/jsoniq/supplemental_plane.xq (+0/-2)
Changed in zorba: | |
assignee: | nobody → Sorin Marian Nasoi (sorin.marian.nasoi) |
Changed in zorba: | |
importance: | Undecided → Medium |
Changed in zorba: | |
status: | New → In Progress |
Changed in zorba: | |
status: | In Progress → Fix Committed |
Changed in zorba: | |
status: | Fix Committed → Fix Released |
Changed in zorba: | |
status: | Fix Released → Confirmed |
assignee: | Sorin Marian Nasoi (sorin.marian.nasoi) → Paul J. Lucas (paul-lucas) |
importance: | Medium → High |
milestone: | none → 2.7 |
summary: |
- JSON Module not escaping escape characters + JsonML serialization not escaping characters |
Changed in zorba: | |
status: | Confirmed → Fix Committed |
Changed in zorba: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
This bug will be fixed with version 2.0 of the core JSON module => as a result this bug is linked with the lp:~zorba-coders/zorba/feature-json_parser branch.