You can think JSON as a textual way of representing data. It has now become the de facto data-interchange format. JSON is used for communication between server side technologies and mobile app or website.
Both JSON and XML are data-interchange format but still possess some differences which are listed below-
JSON | XML |
---|---|
JSON is short and lightweight. | XML is heavy and verbose. |
JSON is simple to read, write and understand. | XML is less simple to read, write and understand. |
JSON stands for JavaScript Object Notation. | XML stands for Extensible Markup Language. |
JSON is data based. | XML is document based. |
File extension of JSON data is .json. | File extension of XML data is .xml. |
JSON is parsed with the help of functions present in programming languages. | XML requires XML parser to parse it. |
Array is supported by JSON. | Array is not supported by XML. |