What are the benefits of JSON over XML?

What are the benefits of JSON over XML?

Ninja Asked on 18th September 2018 in JSON.
Add Comment
1 Answer(s)
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
Ninja Answered on 18th September 2018.
Add Comment