War of JSON and XML

Source: Internet
Author: User
War of JSON and XML

With the rapid spread of Ajax, JSON was widely used and penetrated into non-Ajax fields. xml purists fought back and stirred up a new round of war.

The XML purist believes that XML is an existing standard and has been widely supported and applied. It does not need JSON to re-invent chelaile ). In addition, XML is designed to take into account the simplest to most complex requirements. JSON will encounter many restrictions in complex situations and will face various extensions and variants. In addition, XML supports a wide range of tools and powerful support from giant beast-level enterprises to ensure persistent support. JSON, like lisp, may fail to be read in 10 years.

JSON advocates refuted that XML is an extended self-document tag format that supports any data format including object data. It is not convenient to represent object data and there is a competition between tags and attributes, JSON is a pure object data format, and is easy to read. The advantage of re-invention is that it can be used to create a more round wheel ). Compared with XML, JSON is quite lightweight, and both generation and resolution are simple and fast. XML is a specification used to define the format, requires a huge and complex parser, And it is costly to define and maintain the new format, reuse existing formats such as soap, XML-RPC is too complicated.

In fact, this is a problem of cool-killing. XML is a cool-cutting tool, which is forged by a giant animal-level enterprise and can complete any super tasks at the big, giant, and cosmic level, at the same time, in order to reduce costs and lead the market, they hope that everyone will use this tool. But a lot of people are doing chicken killing, and it is not easy to use a knife, so they made a cheap kitchen knife.

What's more, simple things tend to have stronger vitality. Just as word, HTML, and Flash are so common today, we still often use notepad. We also need to ask why we need so many XML tools. I think a conscientious boss will not use NotePad to torture his XML programmer.

XML advocates repeatedly stressed the internationalization of text encoding, but JSON standards clearly stipulate that JSON text must be unicode encoding, UTF-8 or UTF-16 can be identified by the Unicode file header, it is actually easier than XML.

Reference: www.json.org

UPDATE: The rise of JSON does not mean it can replace XML. Instead, it provides an XML alternative in the appropriate fields, XML is still the best choice in the fields of document data, complex data structures, and general data exchange.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.