JavaScript Object Notation

JavaScript Object Notation

« Back to Glossary Index
Visit Us
Follow Me

JavaScript Object Notation, commonly known as JSON, is a lightweight data-interchange format that is easy for humans to read and write and easy for machines to parse and generate. 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.

The structure of JSON is a set of key/value pairs, often used to send data between a server and a web application or between different parts of a complex application. Its simplicity has resulted in widespread use, particularly as an alternative to XML in web services and APIs.

JSON is often used for asynchronous browser–server communication, replacing XML in conjunction with AJAX (Asynchronous JavaScript and XML). Despite its relationship to JavaScript, JSON is language-agnostic, with parsers available for virtually every programming language.

In terms of syntax, JSON uses braces ({ }) to define objects, brackets ([ ]) to define arrays, and uses a colon (:) to separate keys and values in objects. All keys must be strings, and values can be strings, numbers, objects, arrays, booleans, or null.

You may also like...