|
|
|
|
|
by berkes
1336 days ago
|
|
> Isn't JSON 100 times better, smaller and easy to use than XML? Quite certainly not. It's not even more popular if HTML is included. It may be smaller, but not nessecarily so: both json and XML are easy to compress due to repetitive (overhead) characters. Uncompressed it depends on the use-case and implementation: the ability to have both attributes and content on a node, allow (but certainly not always are) XML to be smaller than JSON which does not have this. Easy to use depends on the features: JSON is gaining complexity rapidly (json-ld, json-templates, jsonschemas etc) to fill up what XML can do OOTB. Sure: an all-out XML (XMLT, DTD, etc) is far more complex than a simple JSON. But hardly more than a JSON with JSTL, JSon-schema etc. The exact same performance and security problems arise in JSON with all these features bolted on. In other words: "it depends". But the idea that "JSON is 100x better" is repeated oft in the tech scene, yet impossible to back up in general. JSON may certainly be better for your case. But so can XML. |
|
Nowadays HTML is not XML anymore [1].
[1]: https://stackoverflow.com/a/39560454/735926