JSON short for JavaScript Object Notation is a lightweight computer data interchange format. It is a text-based, human-readable format for representing simple data structures and associative arrays (called objects).
The JSON format is specified in RFC 4627 by Douglas Crockford. The official Internet media type for JSON is application/json. The JSON file extension is .json.
The JSON format is often used for transmitting structured data over a network connection in a process called serialization. Its main application is in Ajax web application programming, where it serves as an alternative to the use of the XML format.
Electronic Data Interchange (EDI)
EDI can be formally defined as 'The transfer of structured data, by agreed message standards, from one computer system to another without human intervention'. Even in this era of technologies such as XML web services, the Internet and the World Wide Web, EDI is still the data format used by the vast majority of electronic commerce transactions in the world.
JSON – Data Interchange Format
JSON is a data interchange format whose design goals were to be textual, minimal, and a subset of JavaScript; it supports two structures: objects (unordered collections of name/value pairs) and arrays (ordered sequences of values), as well as four simple types: strings, numbers, Booleans, and null. Some of the main points Douglas raises for why JSON is well-suited as a data-interchange format were:
It's simultaneously human- and machine-readable format;
* It has support for Unicode, allowing almost any information in any human language to be communicated;
* The self-documenting format that describes structure and field names as well as specific values;
* The strict syntax and parsing requirements that allow the necessary parsing algorithms to remain simple, efficient, and consistent;
* The ability to represent the most general computer science data structures: records, lists and trees.
JSON's basic types are:
* Number (integer, real, or floating point)
* String (double-quoted Unicode with backslash escaping)
* Boolean (true and false)
* Array (an ordered sequence of values, comma-separated and enclosed in square brackets)
* Object (collection of key: value pairs, comma-separated and enclosed in curly braces)
* null
Advantages of JSON
* Simpler than XML because it is not a markup language and a natural representation of data.
* JSON is better data exchange format, XML is a better document exchange format.
* JSON is easier to read for machines with no/thin client-side library.
* JSON is a natural fit for data consumption by browser clients, for example Ajax components.
* Ability to represent general data structures: records, lists and trees.
* Parsing and generating JSON support in 21 languages.
Disadvantages of JSON
*JSON is a newer format so not enough tools to help with authoring & parsing. Some available are:
*JSON Tools – Java Tools for the JSON Format (parser, renderer, serializer, mapper, validator)
*JSON-lib – Java library for transforming beans, maps, collections, java arrays and XML to JSON and back again to beans.
*JSON in Java – Java APIs from json.org (see more below)
*JSON-taglib – JSON-taglib is a JSP 2.0 tag library used to render JSON data from within JSP code.
*JSON does not have a <[CDATA[]]> feature, so it is not well suited to act as a carrier of sounds or images or other large binary payloads.
* Unlike XML, JSON does not provide any display capabilities because it is not a document markup language. JSON was not even intended for that purpose.
* JSON is not extensible – it does not need to be because it's not a document markup language.
Comparison of JSON with XML
Simplicity
XML is simpler than SGML, but JSON is much simpler than XML. JSON has a much smaller grammar and maps more directly onto the data structures used in modern programming languages.
Extensibility
JSON is not extensible because it does not need to be. JSON is not a document markup language, so it is not necessary to define new tags or attributes to represent data in it.
Interoperability
JSON has the same interoperability potential as XML.
Openness
JSON is at least as open as XML, perhaps more so because it is not in the center of corporate/political standardization struggles.
Related Posts
- No related posts found





Excellent post..Keep them coming
Thanks for sharing.
Nice post..Keep them coming
Thanks for sharing.
Very interesting blog post I love your site keep up the amazing posts