Re:JSONx is an IBM standard format to represent JSON as XML
by sp332 on Tuesday September 23, 2014 @01:46PM
(#8356770)
But what if the original JSON had a string that looks like XML? Does {"endTag": "</json:string>"} become <json:string> </json:string> </json:string> ?
[ Parent
| on HN ]
Re:JSONx is an IBM standard format to represent JSON as XML
by masklinn on Tuesday September 23, 2014 @01:48PM
(#8356792)
Of course not, it's either embedded in a CDATA section or the characters are escaped to the relevant entities: http://www.w3.org/TR/xml/#syntax
> The ampersand character (&) and the left angle bracket (<) must not appear in their literal form, except when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section. If they are needed elsewhere, they must be escaped using either numeric character references or the strings " & " and " < " respectively. The right angle bracket (>) may be represented using the string " > ", and must, for compatibility, be escaped using either " > " or a character reference when it appears in the string " ]]> " in content, when that string is not marking the end of a CDATA section.
Re:JSONx is an IBM standard format to represent JSON as XML
by bitwize on Tuesday September 23, 2014 @01:53PM
(#8356833)
They'd probably escape out the angle brackets with entities. Sorry, Bobby Tables.
Re:JSONx is an IBM standard format to represent JSON as XML
by sp332 on Tuesday September 23, 2014 @05:04PM
(#8358236)
Probably, well hopefully, sure. But I want to know whether they did, and whether the technique is fragile.
Re:JSONx is an IBM standard format to represent JSON as XML
by figglesonrails on Tuesday September 23, 2014 @02:14PM
(#8357029)
I don't really understand why you are being down voted for a technical question. It seems like answering it without giving a downvote as a snarky "ISN'T IT OBVIOUS?" would be sufficient.