Primitives

Any sequence of Unicode code points, inserted between " and " (double quotes). Some characters may need to be escaped. See Escape Characters below for these.

Number

Represented in base 10 with no superfluous leading zero. Can include digits between 0 and 9.

It can be a negative number (e.g. -10. It can be a fraction (e.g. .5). It can also have an exponent of 10, prefixed by e, E, +, or -.

Boolean

This can be either true or false.

Null

Empty.

Structures

Data Type

Description

Object

A JSON object is an unordered set of name/value pairs inserted between {} (curly braces).

An object can contain zero or more name/value pairs. Multiple name/value pairs are separated by a , (comma).

Array

A JSON array is an ordered collection of values. It allows you to provide a list of values.

A JSON array begins with [ (left bracket) and ends with ] (right bracket). Its values are separated by , (comma).

Escape Characters

When working with strings, certain characters need to be escaped with a \ (backslash).

For example, to use a " (double quote) within a string, you'll need to escape it. Otherwise any application reading it will think that your double quote marks the end of the string, and cut it short. This will effectively break your data import, as the application tries to interpret the rest of the string.

Here's a list outlining the characters that need to be escaped in a JSON file.