JSON |
XML |
JavaScript Object Notation |
Extensible mark-up language |
JSON object has a type |
XML data is type less. |
JSON is Supported by Most browsers |
Cross-browser XML parsing can be tricky. |
JSON type – String, number, array, Boolean |
All XML data should be string. |
Data is readily accessible as JSON objects |
XML data needs to be parsed. |
Retrieving value is easy |
Retrieving value is difficult |
It Supports only UTF-8 encoding |
It supports various encoding. |
It doesn’t support comments |
It supports comments. |
It is less secured |
It is more secure than JSON |
It does not provide any support for namespace |
It supports namespaces. |
JSON has no tags. |
XML data is represented in tags. |
JSON is data-oriented. |
XML is document-oriented. |
0 Comments