zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #12526
[Bug 878508] Re: JSON Module not escaping escape characters
Yep, it looks like this isn't working. Paul, please investigate.
I'm attaching a query that demonstrates most of the missing escape
sequences in JSON serialization (based on Mauro's original). I only
didn't include any unicode escapes since I know I don't know how to
generate those correctly.
I suspect that JSONiq does many of these correctly, so perhaps the
serialization code could be shared? On the other hand, now would be a
good time to create some test cases for all of these with JSONiq and
verify that it does indeed handle them right...
** Attachment added: "reproduce.xq"
https://bugs.launchpad.net/zorba/+bug/878508/+attachment/3230580/+files/reproduce.xq
--
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/878508
Title:
JSON Module not escaping escape characters
Status in Zorba - The XQuery Processor:
Confirmed
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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/878508/+subscriptions
References