This post explains the JSON Advantages over XML. JSON is more compact. Consider the following XML data
The above example contains three employees information where <empinfo> and <employees> elements help us to understand the overall structure and meaning of the information.
Consider the same information formatted as JSON:
In JSON formatted data closing tags arenâ€™t necessary to match opening tags which reduces the number of bytes needed to transmit the same information. JSON data is 210 bytes, where as comparable XML data is 325 bytes saving more than 100 bytes.
The disadvantage to JSON-formatted data as compared to XML is far less readable to naked eye.
|Share this post :|