- From: <nobody@w3.org>
- Date: Fri, 07 Aug 2015 19:36:36 +0000
- To: public-qt-comments@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=28995
Josh Spiegel <josh.spiegel@oracle.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |---
--- Comment #2 from Josh Spiegel <josh.spiegel@oracle.com> ---
Could you explain why you think the result of xml-to-json-017 was wrong? Here
is the test:
xml-to-json(json-to-xml('"\\\/\"\r\t\n\u0020"'))
The expected result was:
<assert-eq>'"\\/\"\r\t\n "'</assert-eq>
And you changed it to:
<assert-eq>'"\\/"\r\t\n "'</assert-eq>
Here is my thinking:
json-to-xml has a default escape value of false, so the XDM string will not
have a JSON escape for the quotation mark. The XML serialized result of
json-to-xml('"\\\/\"\r\t\n\u0020"') should look like this:
<fn:string xmlns:fn="http://www.w3.org/2005/xpath-functions">\/"
</fn:string>
Then xml-to-json will escape the string as described in bullet 2, b:
"any occurrence of quotation mark, backspace, form-feed, newline, carriage
return, or tab is replaced by \", \b, \f, \n, \r, or \t respectively;"
Which means the quotation mark should be escaped and the original result is
correct. Am I missing anything?
--
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Friday, 7 August 2015 19:36:38 UTC