Difference Wiki

XML vs. JSON

XML and JSON are the data interchange formats used in development of web applications. Both are different from each other are used at their right place. JSON is extended from the JavaScript while that XML has been extended from SGML. Syntax of JSON is lighter than XML as JSON does not contain start and end tags but XML do have start and end tags. JSON supports datatype and arrays while XML does not provide datatype and does not support array. XML support for Namespaces and Comments while JSON does not support Namespaces and comments

Key Differences

XML stands for "Extensible Markup Language" while JSON stands for "JavaScript Object Notation".
JSON does not contain start and end tags but XML do have start and end tags.
JSON is extended from the JavaScript while that XML has been extended from SGML.
Syntax of JSON is lighter than XML
JSON supports datatype and arrays while XML does not provide datatype and does not support array.
Aimie Carlson
Nov 03, 2015
XML support for Namespaces while JSON does not support Namespaces
Harlon Moss
Nov 03, 2015
ADVERTISEMENT
XML support for Comments while JSON does not support Comments.
Harlon Moss
Nov 03, 2015
JSON data cannot be changeable to other formats while XML data can be changed into other formats like plain text, JSON.
Mapping is quite easy in JSON than in XML as JSON is data oriented while XML is document oriented.
Samantha Walker
Nov 03, 2015
JSON is better for web services while XML is better for configuration.
Aimie Carlson
Nov 03, 2015

XML and JSON Definitions

XML

An international standard metalanguage for creating markup languages that structure digital information in a way that allows for the exchange, display, and storage of data independent of proprietary operating systems and hardware devices.

What is XML?

XML is the data interchange format used in development of web applications. XML stands for “Extensible Markup Language”. It is extended from Standard Generalized Markup Language (SGML). It contains set of rules to encode a document to be readable for human and machine. It is comparatively heavy. By mixed use of attributes and elements, it supports objects along with supporting Namespaces. and Comments.

What is JSON?

JSON is the data interchange format used in development of web applications. JSON stands for “JavaScript Object Notation”. It is extended from JavaScript. It is text based format and thus is human readable. It is quite lighter and faster. It supports for objects but not for Comments and Namespaces.

Trending Comparisons

New Comparisons