JSONx is an IBM standard format to represent JSON as XML
11–20 of 68 posts
Re: JSONx is an IBM standard format to represent JSON as XML
#12Re: JSONx is an IBM standard format to represent JSON as XML
#13Re: JSONx is an IBM standard format to represent JSON as XML
#14Re: JSONx is an IBM standard format to represent JSON as XML
#15Earlier quoted context omitted.
It would look a lot more reasonable if they had set the root namespace instead of leaving it separate and requiring every element to be prefixed.
Yep. The rest of it is, well, xml, and it's not going to be as clean looking as json , but why do I need to see the word json at the start and stop of every element? It could at least be abbreviated to just 'j'? On the plus side I bet the output gzip's up rather nicely in transit assuming you're HTTP GET'ting this data....
Re: JSONx is an IBM standard format to represent JSON as XML
#16Re: JSONx is an IBM standard format to represent JSON as XML
#17Earlier quoted context omitted.
It would look a lot more reasonable if they had set the root namespace instead of leaving it separate and requiring every element to be prefixed.
Yep. The rest of it is, well, xml, and it's not going to be as clean looking as json , but why do I need to see the word json at the start and stop of every element? It could at least be abbreviated to just 'j'? On the plus side I bet the output gzip's up rather nicely in transit assuming you're HTTP GET'ting this data....
The XML is 901 bytes, gzip yields 401 (44.5%)
Of course the original JSON is 303 bytes and JSON is already pretty compressible, to 215 bytes (71%) in this case.
Re: JSONx is an IBM standard format to represent JSON as XML
#18From the department-of-redundancy-department.... The output syntax is even more glorious than you'd think: http://www.datapower.com/schemas/json jsonx.xsd" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" xmlns:json=" " rel="nofollow">http://www.ibm.com/xmlns/prod/2009/jsonx"> John Smith 21 2nd Street New York NY 10021 212 555-1111 212 555-2222 false 62.4 > 640 ...and no, I'm not joking, and don't call me Shirl…
Re: JSONx is an IBM standard format to represent JSON as XML
#19Most likely they developed this format to store JSON in DB2 or to manipulate JSON with existing XML-based tools.
Re: JSONx is an IBM standard format to represent JSON as XML
#20From the department-of-redundancy-department.... The output syntax is even more glorious than you'd think: http://www.datapower.com/schemas/json jsonx.xsd" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" xmlns:json=" " rel="nofollow">http://www.ibm.com/xmlns/prod/2009/jsonx"> John Smith 21 2nd Street New York NY 10021 212 555-1111 212 555-2222 false 62.4 > 640 ...and no, I'm not joking, and don't call me Shirl…
But what if the original JSON had a string that looks like XML? Does {"endTag": " "} become ?
> The ampersand character (&) and the left 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.