More and more, I see JSON being used to:
- Communicate between server-side processes.
- Serialize and store data.
What is the benefit to using JSON over XML in these situations?
JSON's original benefit was that it serialized directly into Javascript objects, thus easing Ajax programming when working with Javascript client-side (server-side Javascript programming would clearly benefit too, relatively rare as it is).
But XML has a large history, and an ecosystem of supporting technologies and protocols (XSL, XSLT, XInclude, XQuery, XPath, XML Schema, serialization support, etc.). Why is JSON infiltrating the non-Javascript world (and data serialization), when it simply seems to be duplicating the role that XML has historically played, but without all the support technology and work that it's taken XML decades to develop?
When I choose XML over JSON in serialization and communication situations that don't use Javascript in any way, I seem to be going against a growing trend. What am I missing?
Edit: My question is not solely about parsing speed (though that might be one factor). My question is more about the lack of supporting technologies and protocols in JSON which have existed in XML for years, and why the technology community felt the need to re-invent this particular wheel.