zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #12573
[Bug 878508] Re: JSON Module not escaping escape characters
After some investigation, I don't think there's anything I can do about
this. When *I* get a string's value via store::Item::getStringValue(),
it is in its canonical representation, i.e., < is actually a literal
<, etc. There's some other XML serializer "downstream" from me that
converts the illegal characters in XML to their &'d counterparts. If
it's serializing JSON, clearly, it shouldn't do that.
Note that characters like <, >, &, are actually *legal* in JSON, so
those shouldn't be converted at all. (In fact, it's illegal to \ them.)
--
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