JSON-vs-XML
What is JSON? JSON_Syntax JSON_Data Types JSON_vs_XML JSON_Array JSON_Object
JSON is a JavaScript Object Notation. XML is an eXtensible Markup Language. Both JSON and XML can be used as data interchange formats. Many programming languages use this JSON or XML for data transfer between the client and the web server. Here, we list down the few differences between JSON and XML.
JSON | XML |
---|---|
The JSON is defined as a lightweight data-interchange format | XML means Extensible Markup Language that is designed to carry the data over the network |
JSON is extended from JavaScript | XML is extended from SGML |
The type of format used in JSON is a data interchange | The type of format used in XML is a markup language. |
The JSON doesn't use both begin and end tags | XML uses both begin and end tags for each element |
The JSON supports an array | The XML doesn't support an array |
To compared with XML, The JSON is less secured | XML Provides more secured |
The JSON is a data-oriented | XML is a document oriented |
The JSON is more efficient and processed faster than the XML | XML is less efficient and processed slower than JSON |
The JSON file is shorter and easy for a human to read and write | The XML documents are large and complex that is both human-readable and machine-readable |
We save the JSON file with an extension of .json | We save the XML file with an extension of .xml |
For example: { "First_Name" : "Mano", "Last_Name" : "Ram", "Age" : 35 } |
|