Saturday, 18 July 2015

JSON Introduction

JSON - JavaScript Object Notation

               JSON is a lightweight text-based open standard data-interchange format. It is human readable. JSON is derived from a subset of JavaScript programming language. It is entirely language independent and can be used with most of the modern programming languages.
Key Points:

1.    There are four basic data types strings, numbers, booleans and null.
2. Objects are wrapped within ‘{’ and ‘}’. It is list of label – value pair.
3. Array are enclosed by ‘[’ and ‘]’. It is list of values.
4. Both object and array can be nested.
with the reference for more

json structure
 W3resources
Advantages of JSON:
1. Faster -:  JSON syntax is very easy to use. Which provide us a easy parsing of the data and faster execution of the data.
2. Portable -: It has wide range of supported browser compatibility with the operating systems so doesn’t require much effort to make it all browser compatible. JSON is portable because parsers and writers are available for many, many languages. It is the best way to transmit complex structures like arrays and objects, and have it still be compatible with multiple languages.
3. Server Parsing -: JSON server side parsing is strong point that indicates us to use the JSON on server side.
4. Tool for sharing data -: JSON is the best tool for the sharing data of any size even audio, video etc. This is because JSON stores the data in the arrays so data transfer makes easier. For this reason, JSON is a superior file format for web APIs and for web development.
5. Structure -: JSON provides structure because the data you transmit with it can have consistent formatting. This is instead of transmitting back plain-text (i.e. unformatted) data, like comma-separated or delimited data.
6. API -: API is the most widely used area where JSON is used for data exchange. Specially, web applications those have a social face, it has become obvious now that they have an API, so that developers can consume the huge amount of data collected by the app and then can create derivative apps.