|
|
|
|
|
by Jesse_Ray
5219 days ago
|
|
XML may seem harder than JSON, until you actually try to work with the data. When you need to create an automated system that checks that data has a certain format, XML has support for schemas and there are many software tools for creating schemas, which is something that cannot be said of JSON. Likewise, searching for data is much easier when you have a standard like XPath. Something akin to XPath would be much harder to make for JSON, since it lacks native support for element attributes. When the data needs to be transformed into a variety of formats, XSLT comes to the rescue. When you want to give the user data in a readable way, JSON requires server-side processing whereas XML and CSS (and sometimes XSLT) support is built into the web browser. In my opinion, JSON gets too much attention for what little it offers. It could become a serious alternative to XML in the distant future, but not until it has the kind of technological environment that XML enjoys. |
|
JSON has smoked XML in the RPC/SOAP etc style uses. Including replacing the X (for XML) in AJAX.
It is also the preferred format for many datastores.
It does not have mature tools like the ones you describe, e.g for schema validation, transformation, etc. Then again, lots of people have found that in regards to XML, the aren't gonna need them, anyway.
For other uses, still, XML is king.