Distinguish, differentiate, compare and explain what is the difference between XML and JSON. Comparison and Differences.

Difference between XML and JSON

1. XML uses XSD Validation. JSON has no Validation.

2. XML Includes namespaces while in JSON no namespaces

3. XML requires parsing and XML doc is parsed through parameters like xpath etc. In JSON, parsing is just an eval. Therefore it is fast.

4. In XML, JavaScript work with strings and it may require additional parsing. In JSON, JavaScript can work with objects-run time evaluation of types.

5. XML write JavaScript to parse the xml objects. JSON is a JavaScript object.

6. XML is heavy compared to JSON

About Author: Jeniffer Fleming