JSON Getting started with JSON JSON Syntax Rules


JSON (JavaScript Object Notation) syntax is based on a subset of JavaScript (see also json.org).

A valid JSON expression can be one of the following data types

  • simple data types: String, Number, Boolean, Null
  • composite data types: Value, Object, Array

Simple data types

A JSON string has to be enclosed in double quotes and may contain zero or more Unicode characters; backslash escapes are allowed. Accepted JSON numbers are in E notation. Boolean is one of true, false. Null is the reserved keyword null.

Data typeExamples of valid JSON
### String"apple"
### Number3
### Booleantrue
### Nullnull

Composite data types


A JSON Value can be one of: String, Number, Boolean, Null, Object, Array.


A JSON Object is an comma-separated unordered collection of name:value pairs enclosed in curly brackets where name is a String and value a JSON value.


A JSON Array is an ordered collection of JSON values.

Example of a JSON array:

["home", "wooden"]

Examples of JSON objects:

    "id": 1,
    "name": "A wooden door",
    "price": 12.50,
    "tags": ["home", "wooden"]

  [3, 4, 5, 6],
    "id": 1,
    "name": "A wooden door",
    "price": 12.50,
    "tags": ["home", "wooden"]

Online tools for validating and formatting JSON data: