JSON - JavaScript Object Notation, JSON Tutorial
JSON JavaScript Object Notation
JSON Tutorial
JavaScript Object Notation
JSON
JSON is a lightweight data interchange format. JSON stands for JavaScript Object Notation. It is a text format to store and transmit data objects. JSON is a collection of name (key) / value pairs.
Douglas Crockford originally specified the JSON format.
JSON was based on a subset of the JavaScript scripting language and is commonly used with JavaScript, but it is a language independent data format. Code for parsing and generating JSON data is readily available in many programming languages.
The json.org is the official website for JSON. JSON's website lists JSON libraries by language.
What is JSON ?
- JSON stands for JavaScript Object Notation.
- JavaScript Object Notation (JSON) is a lightweight data interchange format.
- JSON is language independent data exchange format.
- JSON is easy for humans to read and write.
- JSON is name / value pair representation.
What exactly is JSON ?
JSON is simply a format to send data from server to client and client to server. The JSON syntax is derived from JavaScript object notation syntax, but the JSON format is text only.
What are the Uses of JSON ?
- Serializing and transmitting structured data over network.
- To send data between client and server in web applications.
- It is widely used in modern programming languages.
- It is used in web services and APIs.
What are the Characteristics of JSON ?
- JSON is easy to read and write.
- JSON is lightweight text based interchange format.
- JSON is language independent.
What is the extension of JSON File ?
The extension of JSON (JavaScript Object Notation) file is .json
What is the JSON MIME Type ?
The MIME type for JSON text is application/json
Data Types in JSON
JSON Data Types
- string
- number
- boolean
- null
- object
- array
How Many Types of Data Types in JSON ?
There are two types of data types in JSON.
- JSON Simple Data Types
- JSON Complex Data Types
What Are The Simple Data Types in JSON ?
The JSON data types string, number, boolean, null are simple data types.
What Are The Complex Data Types in JSON ?
The JSON data types object and array are referred as complex data types.
What is string Data Type in JSON ?
The string data type in JSON is a sequence of zero or more Unicode characters. JSON string must be written in double quotes, using backslash escapes. A character is represented as a single character string. A string is very much like a C or Java string.
JSON string Data Type Example
{"name":"Lucky"}
What is number Data Type in JSON ?
The number data type in JSON is very much like a C or Java number, except that the octal and hexadecimal formats are not used.
JSON number Data Type Example
{"age":16,"percentage":87.55}
What is boolean Data Type in JSON ?
The boolean data type in JSON is either true or false.
JSON boolean Data Type Example
{"isAlive":true,"isActive":false}
What is null Data Type in JSON ?
The null data type in JSON is used to define nullable value.
JSON null Data Type Example
{"grade":null}
What is object Data Type in JSON ?
The object data type in JSON is an unordered set of name (key) / value pairs. An object begins with { left brace and ends with } right brace. Each name (key) is followed by : colon and the name (key) / value pairs are separated by , comma.
JSON object Data Type Example
{"employee":{"name":"Lucky","age":33,"city":"New Delhi"}}
What is array Data Type in JSON ?
The array data type in JSON is an ordered collection of values. An array begins with [ left bracket and ends with ] right bracket. Values are separated by ,comma.
JSON array Data Type Example
{"fruits":["Apple","Banana","Orange","Grapes","Pineapple"]}
What is jsonlint ?
JSONLint is a validator and reformatter for JSON, a lightweight data-interchange format. Copy and paste, directly type, or input a URL in the editor JSONLint validate your JSON code.