2 ms·
To take a slightly cynical view, but a view I honestly believe in, on the want to switch to JSON: XML looks old, most programmers have shallow opinions and chas
by RadiozRadioz 11mo ago
To take a slightly cynical view, but a view I honestly believe in, on the want to switch to JSON: XML looks old, most programmers have shallow opinions and chase new things.
It's not parsing performance, computers are plenty fast for text IM. It's not bandwidth, the difference between JSON and XML is negligible after compression. It's not developer ergonomics, any sane programmer is using a library that abstracts either format. It's not compatibility with the domain, as XML wins for XMPP due to namespaces.
The answer is that XML looks old. New programmers (half of all programmers have less than 5 years of experience) grew up in a world of JavaScript where XML was "legacy" since the day they arrived. In reality it's kept working fine, while the volume of software has increased around it naturally using the trendy tools. They've not looked back to understand why it was made or why it has merits, it's already got negative connotations and they're caught up in the new stuff. The new stuff has merit too, that is why a programmer is wise to respect both.
Also, what use is a stable and mature XML ecosystem when you can earn big nerd points by reinventing XPath for JSON the 5th time?
- rented_mule 11mo agoXML and JSON only started about 5 years apart (1996 vs. 2001). I think XML's adoption was more broad more quickly, so the gap felt a bit longer than that (XML was a core part of my jobs from 1998-2007 and JSON ever since). I think more of what makes XML look so much older is the fact that so many new projects have been picking JSON over XML for 10-20 years now, and that's why younger folks have seen much more JSON than XML. My software engineering career started long before either, and I have used both extensively. While I don't think that it makes sense for most well established projects to switch, just as rewrites often don't make sense, I would almost always pick JSON for new projects. Your points are valid, but one part of the ergonomics that you didn't mention is that it's so much easier for humans to read and write JSON, thereby speeding up development, debugging, testing, etc.