JSON is a lightweight data interchange format.
JSON is in a completely language-independent text format. This feature makes JSON an ideal data exchange language.
JSON is easy for humans to read and write, but also easy for machines to parse and generate.
XML is one of the most commonly used formats for exchanging and transmitting data in the web, and many web server protocols are defined based on XML.
XML is inherently extensible; XML has rich coding tools, such as Dom4j, JDom, etc.;
JSON and XML are two common text formats in web transmission, and their readability can be described as comparable. One side is simple syntax, and the other side is standardized label form, it is difficult to distinguish winners and losers.
Compared with JSON, the XML format is strictly standardized, and it is easier to transmit more complex data.
JSON has a simple and intuitive format; it can be directly compatible with objects in languages such as JavaScript and Python; it is more efficient when transmitted as a data packet format.