JSON message details

A JSON message consists of name-value pairs (objects), and ordered collections of values (arrays). Objects, arrays, or both structures can be nested.

For more detailed information about JSON, see the JavaScript Object Notation (JSON) web site.

JSON object

In a JSON message, an object is an unordered set of comma-separated name-value pairs that begins with a left brace ({) and ends with a right brace (}). Each name is followed by a colon (:).

JSON object

Read syntax diagramSkip visual syntax diagram{,string:value}

JSON array

A JSON array is an ordered collection of comma-separated values that begins with left bracket ([) and ends with right bracket (]).

JSON array

Read syntax diagramSkip visual syntax diagram[,value]

JSON value

A JSON value can be any of the following structures, any of which can be nested:
  • A string in double quotation marks
  • A number
  • Boolean
  • Null
  • An object
  • An array

JSON value

Read syntax diagramSkip visual syntax diagramstringnumberobjectarraytruefalsenull

JSON string

A JSON string is very much like a C or Java™ string. A string is a collection of zero or more Unicode characters, wrapped in double quotation marks, using backslash escapes. A character is represented as a single character string.

JSON string

Read syntax diagramSkip visual syntax diagram"Any UNICODE character except " or \ or a control character\" (quotation mark)\\ (backslash)/ (forward slash)b (backspace)f (formfeed)n (newline)r (carriage return)t (horizontal tab)u (4 hexadecimal digits)"

JSON number

A JSON number is the same as a C or Java number, except that the octal and hexadecimal formats are not used.

JSON number

Read syntax diagramSkip visual syntax diagram0digit 1-9digit 0-9eE+digit 0-9

Whitespace can be inserted between any pair of tokens.