4 ms·
JSON is used because it is much simpler to generate and parse in browsers than xml. It is also "good enough" for most use cases. So it is reasonable to start
by silvestrov 4y ago
JSON is used because it is much simpler to generate and parse in browsers than xml.
It is also "good enough" for most use cases. So it is reasonable to start out with JSON and only upgrade to XML for complex documents/strutures.
- Zanfa 4y agoJSON is also on average much more human-readable than the average XML document. Sure, you can do awful things with JSON and generate beautiful XML, but for some reason all of the XML I've encountered in production systems is extremely convoluted.
- mschuster91 4y agoAt least you can place comments in an XML file. With JSON, if you are lucky the application developer was lazy enough to not implement a strict schema validator so you can insert dummy keys... but other than that you're out of luck.