25 December 2013

XML VS JSON

XML VS JSON

XML - Extensible Markup Language
JSON - Javascript Object Notation

JSON
JSON uses JavaScript syntax for describing data objects, but JSON is still language and platform independent.

JSON is more lighter and efficient than XML

JSON does not provide any display capabilities because it is not a document markup language.

XML

XML’s strength is extensibility and the avoidance of namespace clashes. It holds any data type and can be used to transport full documents with formatting information included. XML is best used when transporting something like a patient chart or text document with markup included.

XML provide display capabilities.

XML structures are based on elements (which can be nested), attributes (which cannot), raw content text, entities, DTDs, and other meta structures.

Finally,

JSON is a better data exchange format. XML is a better document exchange format. Use the right one for the right job.

No comments:

Post a Comment

Comments Welcome