IBM Integration Bus, Version 10.0.0.5 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS


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 (:).

Read syntax diagramSkip visual syntax diagram
JSON object

          .-,--------------------.          
          V                      |          
>>---{--------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 (]).

Read syntax diagramSkip visual syntax diagram
JSON array

          .-,---------.          
          V           |          
>>---[--------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
Read syntax diagramSkip visual syntax diagram
JSON value

>>-+-string-+--------------------------------------------------><
   +-number-+   
   +-object-+   
   +-array--+   
   +-true---+   
   +-false--+   
   '-null---'   

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.

Read syntax diagramSkip visual syntax diagram
JSON string

>>---"---------------------------------------------------------->

>--+------------------------------------------------------------+-->
   +-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.

Read syntax diagramSkip visual syntax diagram
JSON number

          .---------------.                          
          V               |                          
>>-+---+----+-0---------+-+--+-------------------+-------------->
   '-−-'    '-digit 1-9-'    +-−-----------------+   
                             | .---------------. |   
                             | V               | |   
                             '-----digit 0-9---+-'   

>--+-------------------+---------------------------------------><
   +-e-----------------+   
   +-E-----------------+   
   +-+-+-+-------------+   
   | '-−-'             |   
   | .---------------. |   
   | V               | |   
   '-----digit 0-9---+-'   

Whitespace can be inserted between any pair of tokens.


bc40050_.htm | Last updated 2016-06-25 08:08:41