Register now with code 2023LETSGO and get 10% discount for your 1st project/order!

JavaScript Object Notation (JSON)

Knowledge Base / Glossary: "JSON (JavaScript Object Notation) is a lightweight, text-based, language-independent data interchange format that is easy for humans to read and write and easy for machines to parse and generate. It is based on a subset of the JavaScript Programmi..."

JSON (JavaScript Object Notation) is a lightweight, text-based, language-independent data interchange format that is easy for humans to read and write and easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999. JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an ideal data-interchange language.

JSON is primarily used to transmit data between a server and a web application, as an alternative to XML. It is also used for storing simple data structures and associative arrays (called objects). JSON has become the defacto standard for data interchange on the web, and is supported by almost all modern APIs, and many other technologies.

To use JSON in your programs, you will need to import a JSON library. There are many libraries available for reading and writing JSON in almost any programming language. Here is an example of a simple JSON object:

{ "name": "John Smith", "age": 30, "city": "New York" }

And here is an example of a JSON array:

[{ "name": "John Smith", "age": 30, "city": "New York" }, { "name": "Jane Doe", "age": 25, "city": "San Francisco" }]

In the example above, the first JSON object contains three key-value pairs: "name", "age", and "city". The second example is an array of two JSON objects, each with the same three key-value pairs.