JSON Syntax

JSON is a text format built from two structures: objects of key/value pairs and ordered lists of values.

Objects and arrays

An object is a collection of key/value pairs wrapped in curly braces. An array is an ordered list wrapped in square brackets.

{
  "name": "Ada",
  "tags": ["developer", "json"]
}

Syntax rules

Nesting

Objects and arrays can be nested to any depth. This is how JSON represents trees, tables, API payloads and configuration documents.

{"project":{"name":"json.tools","stack":["static","vue"],"public":true}}