Skip to content
Search

JavaScript Object Notation

lastmod 2026-09-10created 2018-06-1443 edits

JSON (JavaScript Object Notation) is a lightweight DATA-interchange format. It 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 familiar to programmers of the C-family of languages - C, C++, C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an ideal DATA-interchange language.

JSON is built on two structures:

  • A collection type of name/value pairs. In various languages, this is realized as an object, record, struct, dictionary, hash table, keyed list, or associative array.
  • An ordered list of values. In most languages, this is realized as an array, vector, list, or sequence.

These are universal DATA structures. Virtually all modern programming languages support them in one form or another. It makes sense that a DATA format that is interchangeable across programming languages is also based on these structures.

Categories

Syntax

JSON syntax is based on the object syntax of ECMA-262 3rd edition, the JavaScript standard, and is encoded in Unicode. The data types it can represent are numbers, strings, and true/false, and it can also represent arrays and objects. An array is written with square brackets []. Each element of an array is a primitive type, an array, or an object.

[10, {"v": 20}, [30, "마흔"]]

An object is a set of name/value pairs enclosed in curly braces {}. Names are strings, so they must be quoted, and values are primitive types, arrays, or objects. The order in which the pairs appear has no meaning.

{"name2": 50, "name3": "값3", "name1": true}

It is fine to leave the names unquoted as below, but quoting them makes it easier to tell strings and numbers apart.

{name2: 50, name3: "값3", name1: true}

A JSON message unit is an array or an object. Both examples above can be JSON messages.

Json Path

See JSONPath.

See also

Favorite site

Online Tools

author Zer0 sitemap