Home >Web Front-end >JS Tutorial >Comparative analysis of json and xml_json
·Readability
The readability of JSON and XML is comparable. One side is the recommended syntax, and the other side is the standardized tag form. It is difficult to distinguish the winner.
·Extensibility
XML is naturally very scalable, and JSON certainly has it. There is nothing that XML can extend that JSON cannot.
·Encoding Difficulty
XML has a wealth of encoding tools, such as Dom4j, JDom, etc. JSON also has tools provided by json.org, but JSON encoding is obviously much easier than XML, even without the help of tools Write JSON code, but it is not easy to write XML well.
·Decoding Difficulty
XML parsing must consider child nodes and parent nodes, which makes people dizzy, while JSON parsing difficulty is almost 0. XML loses really nothing at this point.
·Popularity
XML has been widely used in the industry, and JSON has just begun. However, in the specific field of Ajax, the future development must be that XML gives way to JSON. By then Ajax should become Ajaj (Asynchronous JavaScript and JSON).
Although json has many benefits, in the final analysis xml is still very good and powerful. ...
This article comes from cssrain.cn Original link: http:// www.cssrain.cn/article.asp?id=489