3 ms·
I disagree that JSON has "liberated" most of the programming world from XML. In many, many, many places where XML has been used in the past, it is still used b
by WayneDB 14y ago
I disagree that JSON has "liberated" most of the programming world from XML. In many, many, many places where XML has been used in the past, it is still used because JSON is a very poor substitute in those cases.
- pestaa 14y agoAgreed, but JSON still offers a fine alternative when you have no requirements for XML's verbosity and other characteristics.
- mmahemoff 14y agoPretty much all APIs from web/tech/startups now are JSON-based, I think. I'm sure XML is still used in enterprise and legacy situations, but it would have been a lot more widespread if JSON didn't come along.
- vidar 14y agoEnterprise and legacy are not a trivial part of the computing landscape.
- mmahemoff 14y agoThey sure aren't.
- WayneDB 14y agoOf course JSON caught on with startups who are mostly targeting web users, whose programmers are mostly web developers who write a lot of Javascript. XML is used for far more than just APIs though. However, I suspect that you personally weren't thinking "just APIs" when you wrote that the programming world was desperate to be liberated from XML bondage. Be honest. You think JSON is far superior to XML in almost every way and you would never consider XML for any task. Also tell us what kind of programming you do most of the day and who you do it for. Me - I write operations software for a pharmaceutical services company to run a warehouse, call center, marketing and miscellaneous. I float between writing web, desktop and back-end services apps. Most of our clients and partners (big pharmaceutical companies) are working with XML - even for new services and data exchanges. We barely ever see JSON coming from those companies. I'd argue that there are more of these enterprises out there than there are web startups. If you had said "web programming world", I might not have disagreed.
- abraininavat 14y ago"Only web developers use JSON" does not imply "JSON is good only for web development". You're writing a lot, but telling us little. Why is JSON bad for non-web applications?
- jebblue 14y agoJSON describes objects in compact notation, XML describes the world in terms two computers talking to each other can understand and it is very readable for humans who need to debug it and it can be validated with a DTD.
- mmahemoff 14y agoYes, I'm mostly focused on the web programming world (which includes the enterprise, though not my current project) and I can't account for how much XML is used behind firewalls, versus JSON, YAML, protocol buffers, or anything else. When I previously worked in finance and logistics industries, I constantly found the theoretical benefits of XML never translated into reality due to a range of problems (e.g. even XML schema left ambiguities if it hadn't been spec'd right, horrendous Java library dependency issues, complexity of XPath). Maybe it's a better situation now. There's plenty of people using JSON for data exchange outside of web and JavaScript developers. It's surely convenient that JSON is valid JS, and some might say they have the same "father", but it's real benefit is as a lightweight data format. Example - I'm using it right now to interface from a Java/Android client to a Rails server. There are 3000-odd SO questions on "Android JSON" (http://stackoverflow.com/questions/tagged/json+android http://stackoverflow.com/questions/tagged/json+android) and I'm guessing most of those Android devs aren't interfacing with JS.
- rickhanlonii 14y agoI don't think that mmahemoff was claiming that JSON liberated the programming world from XML, but that it was widely adopted by people sought to be free from the more verbose benefits of XML. Those who wanted or needed these characteristics did not switch. Thus, I don't think you two really disagree (though with so much XML bashing I think you make a valuable point).