What is JSON ?

In this tutorial, we will learn about What is JSON ?

JSON (JavaScript Object Notation) is a lightweight data-interchange format introduced by Douglas Crockford. It is easy for humans to read and write. JSON is known as the data interchange standard, which implies that it can be used as the data format wherever the exchange of data occurs. A data exchange can occur between both browser and server and even server to server. It is a very common data format used for asynchronous browser–server communication.

JSON is a language-independent data format. It has been extended from the JavaScript scripting language. The official Internet media type for JSON is application/json. JSON filenames use the extension .json. It is a syntax for storing and exchanging data. JSON is text, written with JavaScript object notation.

In a nutshell, JSON is a textual representation defined by a small set of governing rules in which data is structured. The JSON specification states that data can be structured in either of the two following compositions:

  • A collection of name/value pairs
  • An ordered list of values

Data structures in JSON are based on key/value pairs. The key is a string, the value can be a numerical value, a boolean value (true or false) or an object. JSON is often used to serialize and transfer data over a network connection, for example between the web server and a web application. Serialization is the process of taking a snapshot of a data structure in a manner that allows it to be stored, transmitted, and reconstructed back into a data structure at a later point in time.

Example of JSON:
A JSON object is a set of key/value pairs which starts with “{” and ends with “}”.

Key Points about JSON:

  • JSON stands for JavaScript Object Notation.
  • It was specified by Douglas Crockford.
  • It is a lightweight data-interchange format.
  • It has been extended from the JavaScript scripting language.
  • It is used for asynchronous browser–server communication.
  • JSON is a language-independent data format.
  • The official Internet media type for JSON is application/json.
  • JSON filenames use the extension .json.
  • JSON stores data in a set of key/value pairs which starts with “{” and ends with “}”.

Related posts

Leave a Comment