Beginner Asked on September 25, 2018 in Markup Languages.
First, let’s look over what these two are,in brief.
XML(Extensible Markup Language)is a document markup based applications as a way to store documents.
Following are the advantages of XML over JSON.
- Schema support-Since,the data might travel between several system, deviations from the expected format are possible.Hence,XML would not lead to incorrect data,in case of deviations from the defined schema.However,your data may not be processed in JSON under such scenario.
- Rendering in a highly readable format-The tree structure of XML enables the browser to render the data in a highly readable and organised way.
- In XML the metadata could be put into the tags in the form of attributes, whereas in JSON the metadata as well as the actual data are wrapped together as an object.
The above features would appear in JSON,but for now XML is preferred format for web services and file formats.JSON is useful while developing a web application where fast, compact and convenient serialization is of data is required.
- 364 views
- 1 answers
- 0 votes