What are the benefits of JSON over XML?
Answered
What are the benefits of JSON over XML?
Best answer
Benefits of JSON over XML are:
- Lighter and faster than XML as on-the-wire data format
- Object Representation – Information is presented in object notations, data is readily accessible as JSON objects in JavaScript code whereas XML data needed to be parsed and assigned to variables through DOM APIs
- JSON objects supports multiple data types while XML data is all string
- Retrieving values from JSON is as easy as reading from an object property in JavaScript code