News for hackers. Stuff that matters.
Re:JSONx is an IBM standard format to represent JSON as XML by drawkbox on Friday April 29, 2011 @05:14PM (#2499017)
Why oh why... If it helps JSON invade the enterprise then ok, but why make a good thing bad.
Re:JSONx is an IBM standard format to represent JSON as XML by gte910h on Friday April 29, 2011 @05:18PM (#2499029)
http://publib.boulder.ibm.com/infocenter/wsdatap/v3r8m1/inde...

To allow you to use XSLT tools apparently.

Re:JSONx is an IBM standard format to represent JSON as XML by ericmoritz on Friday April 29, 2011 @05:58PM (#2499162)
XSLT and XPath is about the only reason I can see to use this. But, you know, how hard is:

   x.person.addresses[0].city?
I guess XPath is easier when you probably have to do something like this:

   JSONObject json = (JSONObject) JSONSerializer.toJSON( jsonTxt )
   String city = json.getJSONObject("person").getJSONArray("addresses").getJSONObject(0).getJSONObject("city");
Or however you'd do it in Java.
Re:JSONx is an IBM standard format to represent JSON as XML by wulczer on Friday April 29, 2011 @06:33PM (#2499258)
That's not hard, what's hard is

   //person[@alive="true"]/pets//dog[@hair="long"]/*/flea[@name]
Re:JSONx is an IBM standard format to represent JSON as XML by catshirt on Friday April 29, 2011 @08:07PM (#2499488)
still, i think an xpath evaluator for json would have been the way to go here instead
Re:JSONx is an IBM standard format to represent JSON as XML by Stormbringer on Friday April 29, 2011 @06:35PM (#2499259)
You appear to be confusing Java and Javascript.

JSON stands for Javascript Object Notation.

In Java the equivalent would simply be serialization.

NB: if XSLT and XPath is the solution, you've already lost.

Re:JSONx is an IBM standard format to represent JSON as XML by gte910h on Saturday April 30, 2011 @03:41PM (#2501386)
JSON is used for far far more than javascript these days. It's a far better communication protocol than XML for most things.
Re:JSONx is an IBM standard format to represent JSON as XML by mikeryan on Friday April 29, 2011 @07:35PM (#2499406)
"Some people, when confronted with a problem, think 'I know, I'll XSLT.' Now they have two problems."

(edited for relevance)

Re:JSONx is an IBM standard format to represent JSON as XML by amalcon on Friday April 29, 2011 @06:49PM (#2499299)
This is actually one of the few things XML is very good at: embedding a document within another document.

I mean, it's not something you'd want to use all over the place, but there are situations where it might come in handy.