· Readability
The readability of JSON and XML is comparable. One side is the suggested syntax and the other side is the standard tag format, which makes it difficult to distinguish between the two.
· Scalability
XML is inherently highly scalable, and JSON is also available. There is nothing XML can be extended, and JSON cannot.
· Encoding difficulty
XML has rich coding tools, such as Dom4j and JDom, and JSON also provides tools provided by json.org. However, JSON encoding is much easier than XML, JSON code can be written without tools, but it is not easy to write XML.
· Decoding difficulty
XML parsing takes into account the parent node of the child node, which is confusing, and the difficulty of JSON Parsing is almost 0. There is nothing to say about XML.
· Popularity
XML has been widely used in the industry, and JSON is just the beginning. However, in the specific field of Ajax, the future development of XML must be in JSON. Then Ajax should be changed to Ajaj (Asynchronous JavaScript and JSON.
Although there are many advantages of json, xml is still very powerful in the final analysis ....
This article from cssrain.cn Original article link: http://www.cssrain.cn/article.asp? Id = 489