|
|
|
|
|
by senko
5479 days ago
|
|
JSON is so popular because it's data description abilities are poorer than that of XMLs. Everything in JSON can be easily mapped to a few basic types in any popular language, and so all the JSON writers/readers do exactly that. The consequence is that it's very easy to work with JSON. Contrast with XML, which has node attributes and children, to start with. This alone is sufficient to make it not as naturally representable in any of the languages (Python's ElementTree does come close), so you have to worry about the "syntax". And that's not even considering namespaces or schema. XML having a much richer way to represent data and to reason about the meaning of the data make it a good format for case where it is important. But for everything else, JSON wins. |
|