INTRODUCING JSON
JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read n write. It is easy for machines to parse n generate. JSON is an ideal data – interchange language.
JSON : The Fat-Free alternative to XML
XML – Provides two enormous advantages as a data representation language.
- It is a Text-based
- It is a position-independent.
Unfortunately, Xml is not well suited to data-interchange, much as a wrench is not well suited to driving nails. It carries a well baggage, and it doesn’t match to the data model to the most of the programming languages. There is another text notation that has all of the advantageous as the XML, but it is much better suited as to the data interchange. That notation is Java Script Object Notation (JSON).
Let us compare the XML and JSON on the attributes that xml community considers as important
- Simplicity
XML is simpler than SGML, but JSON is simpler than XML. JSON has much smaller than grammar and maps more directly onto the data structures used in programming languages
- Extensibility
JSON is not extensible because it doesn’t need to be. JSON is not a Document markup language. JSON is not a mark up language, so it is not necessary to define the tags or attributes to represent data in it.
- Interoperability
It is optional as XML.
- Openness
JSON is at least as open as XML, perhaps more because it is not center of corporate/political standardization struggles.
Advantages of XML
Xml is human readable
- JSON is much easier for human to read than xml. It is easy to write to and machine understandable.
XML can b used as an exchange format to enable users to move their data applications between similar applications.
- The same is true for JSON.
XML is easily processed because the structure of the data is simple and standard
- JSON is processed more easily bcz its structure is simple.
Many Views of the one data
- JSON does not provide any display capabilities bcz it is not a document mark up language.
Complete Integration of all data bases and formats
XML documents can contain any imaginable data type-from classical data like text and numbers, or multimedia objects such as sounds, to active formats like Java Applets and Active X Controls.
JSON doesn’t have a < [CDATA []]>the feature, so it is not well suited to act as carrier of sounds or images or other large binary payloads. JSON is optimized for data. Besides, delivering executable programs in data-interchange system could introduce dangerous security problems.
Open and extensible
XML’s is a one-of-a-kind open structure allows u to add other state of art element vn needed. This means always u can adapt
Those Vocabularies can b automatically converted to JSON, making migration from XML to JSON very straightforward.
XML and JSON has this in common Self-Describing data and use Unicode
JSON is built on two structures:
· A collection of Name/ValuePairs.In various languages, this is realized as an object, record, dictionary, struct, hashtable, keyed list, or associative array.
· An orders list of values. In most languages this is realized as an array, vector, list or sequence.
Comments
Join the conversation! Your thoughts help the community grow.