I think your comment is partially true for Mauro's query, but not as far
as I can tell, mine. Mauro returned the result of json:serialize(),
which meant that it would then be serialized as an XML string by Zorba,
causing the escapes to be screwed up. However, in my query, I used
file:write() to output the string directly to a file named "output.txt".
All the same problems are evident in that file, which means that the
returned value of json:serialize() is already wrong.
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
JSON Module not escaping escape characters
Status in Zorba - The XQuery Processor:
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
\" <-> "
\\ <-> \
\/ <-> /
\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.
To manage notifications about this bug go to:
Mailing list: https://launchpad.net/~zorba-coders
Post to : firstname.lastname@example.org
Unsubscribe : https://launchpad.net/~zorba-coders
More help : https://help.launchpad.net/ListHelp