Many times, we compare JSON with XML. The reason is that compared to the complexity of XML, the JSON format is more lightweight and has a smaller file capacity, especially when transmitting data. The data transmission speed will definitely be faster. The data transmission format for API serial connection used to be XML in the past, but nowadays it has mostly been replaced by JSON format.
The biggest difference between JSON and XML is that XML is a complete "markup language", but JSON is not. It is a data exchange format, so XML requires more effort in program interpretation. with time.
Although JSON format has replaced XML in data transmission, providing more convenience in transmission, JSON is not as clear as XML. Especially when the JSON data is very long, it will be cumbersome. and complex data, and find nodes in it. Therefore, although the two are often compared, they still have their own advantages and disadvantages.
XML: Utilizes the characteristics of markup language to provide excellent scalability. It has stronger advantages than JSON in terms of data storage, expansion and advanced retrieval.
JSON: supports the browser's built-in fast parsing, is more lightweight than XML, and is more suitable for use in the field of network data transmission.