News for hackers. Stuff that matters.
Re:JSON or XML: Just Decide by mindcrime on Thursday April 12, 2012 @09:06PM (#3834913)
Use the right tool for the job. I wouldn't say that XML or JSON is always right. But I will say that I believe XML has a better ecosystem around it; with things like XSD, XSLT, XQuery/XPath, etc., and some pretty easy to use data-binding frameworks like JAX-B. My feeling is that XML makes it a lot easier to do certain classes of things that I want to do, like taking a business event message off a queue, match it against an XQuery expression, route it to the appropriate place based on that matching, store it in an XML database where I can later locate it using XQuery, and then render it into a web-based activity stream by applying an XSLT transform.

Sure, you could get there from here with JSON as well, but it sure seems more natural using XML.

Re:JSON or XML: Just Decide by derickson on Thursday April 12, 2012 @10:50PM (#3835189)
Using an XML native NoSQL database is a game changer when consuming XML and producing XML HTTP APIs. A good XQuery engine makes many of the problems people are listing about XML simply go away.

I like @mnot's point about providing "excellent client bindings" in common languages.

Re:JSON or XML: Just Decide by mindcrime on Thursday April 12, 2012 @11:08PM (#3835237)
What DB do you like for storing and querying XML? I've been using eXistDB lately, but I'd be curious to hear if people are finding something else to be better.
Re:JSON or XML: Just Decide by rollypolly on Thursday April 12, 2012 @09:56PM (#3835052)
Yeah, the XML ecosystem is priceless. XPath, for example, is the one reason a project I'm working on can't switch to JSON.
Re:JSON or XML: Just Decide by mindcrime on Thursday April 12, 2012 @10:24PM (#3835126)
I was about to ask if JSON had an equivalent to XPath / XQuery, but it looks like the answer is "yes." http://stackoverflow.com/questions/8481380/is-there-a-json-e...

That's cool to know, and I might just give it a look. But my perception is still that the supporting ecosystem around XML is more mature and comprehensive, at least for some use-cases.

Re:JSON or XML: Just Decide by rollypolly on Thursday April 12, 2012 @10:54PM (#3835209)
Interesting. All these solutions are javascript-based tho. We need a C-based solution (like libxml2).
Re:JSON or XML: Just Decide by BerislavLopac on Friday April 13, 2012 @05:19AM (#3835969)
Have you followed the link? Dead. :-(
Re:JSON or XML: Just Decide by Yarnage on Thursday April 12, 2012 @09:41PM (#3835004)
There are things that seem "natural" when using XML? News to me :)