JSON (JavaScript Object Notation) is a 100% textual data interchange format originally inspired by JavaScript objects. It is widely used in RESTful web services. Parsers for JSON exist in nearly all languages, and libraries also exist which can deserialize JSON to native objects or serialize native objects to JSON.

JSON (JavaScript Object Notation) is an interchange format intended to be machine and human readable. JSON is defined by RFC 7159 which is completely language independent, but uses conventions 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. It is often used in lieu of XML because of its lightweight and compact structure.

JSON is based on two elements:

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

JSON defines six types of values: null, numbers, strings, booleans, arrays and objects. Note that with regards to objects, the order of members is not significant, and the behaviour of a JSON parser when duplicate member names are encountered is undefined.

Note that JSON is not the same thing as JavaScript object literals. Rather, JSON is a common format to serialize from and deserialize to objects in most languages. For more information, see There is no such thing as a JSON object in JavaScript.

See also:

JSON libraries:

Useful links: