Below is the Comparison of JSON and XML Response
Simple syntax, which results in less “markup” overhead compared to XML.
Con: Simple syntax, only a handful of different data types is supported.
FEATURES OF JSON
1.Size | Small
2. Parsing | Take less time
3. Extensibility | Limited to text only.
4. Performance | Good
Generalized markup, it is possible to create “dialects” for any kind of purpose
XML Schema for datatype, structure validation. Makes it also possible to create new datatypes.
XSLT for transformation into different output formats.
XPath/XQuery for extracting information (which makes getting information in deeply nested structures much easier then with JSON).
Relatively wordy compared to JSON (results in more data for the same amount of information).
FEATURES OF XML
1.Size | Big
2. Parsing | Take more time
3. Extensibility | Support multiple date type
4. Performance | Bad