JSON: JavaScript Object Notation | XML: eXtensible Markup Language | |
data-oriented | document-oriented | |
Types | Number, Array, Boolean, String, Object and Null | All string |
Data | JSON Objects are typed | XML data is typeless |
Simplicity of read/ write | √ shorter & faster, no end tag | |
Easy to learn | √ | |
Capability to display | No | Yes,
capable to display data because it is a markup language |
Support array | √ | |
secured | √more | |
Human readable | √more | |
Datatype support | only text and number | text, number, images, charts, graphs etc.
Also, XML offers options for transferring the format/structure of the data with actual data |
Parsed by | a standard JavaScript function into ready-to-use JavaScript object | An XML parser |