Try OpenEdge Now
skip to main content
Working with JSON
Using JSON with OpenEdge : JSON basics : JSON data types
 

JSON data types

Because JSON is designed to be lightweight, it supports only four primitive data types, as shown in the following table.
Table 1. JSON primitive data types
Data type
Description
Examples
string
A string of Unicode characters enclosed in double quotes. A backslash ( \ ) serves as the escape character.
"jump rope"
number
An unquoted numeric value, which can include an exponent
1754.350.9582e-42
boolean
An unquoted lowercase literal string of true or false
true
null
An unquoted lowercase literal string of null
null
The data type of a value is determined by the format of the value. In addition to these primitive data types, there are some non-standard data types in common usage for certain values. For more information about ABL support of non-standard data types, see Data typemapping .
JSON also supports two complex data types, as shown in the following table:
Table 2. JSON complex data types
Data type
Description
Examples
Object
A comma-delimited list of named values, either simple or complex, enclosed in braces
{ "myString" : "jump rope",   "myNum" : 17, "myBool" : false }
Array
A comma-delimited list of unnamed values, either simple or complex, enclosed in brackets
[ "jump rope", 17, false ]