JSON Terminology

A JSON text is either a object, e.g. { "a" : 5 } or an array e.g. [1, 2, 3]. A JSON value is either a JSON text or JSON Simple type where a JSON Simple type is either a JSON literal, a number, a string. A JSON literal is one of following three false, null or true. The literals false and true are called Booleans. A number may be either an integer or a floating point number. There is no limit on the precision or size of numbers, but as soon as these are converted to another representation then the limitation of that representation must of course be respected, e.g. if an integer is extract to an integer variable then the value must be between -263 and 263-1, otherwise the extraction step will produce an error. JSON strings must start and end with a double quotation mark (") and may contain any Unicode character except ", \ or control character (these characters may be escaped using \, e.g. \", \\ and \r. The JSON format is described in RFC 4627.

The figure below shows an overview over the syntax of JSON:

  JSON Text = JSON Object | JSON Array
  JSON Object = {} | { Properties }
  JSON Array = [] | [ items ]
  Properties = Property, Properties
  Property = String : JSON Value
  Items = JSON Value, Items
  JSON Value = JSON Text | String | Number | false | null | true
  String = "" | " Characters "
  Characters = Character Characters
  Character = any Unicode character except ", \ or control character | \" | \\ | \/ | \b | \f | \n | \r | \t | \u 4 hex digits
  Number = a number very much like a C or Java number, see RFC 4627 for details.

JSON Syntax