4D v14.3Overview of JSON commands |
||||||||||||||||||||||||||||||
|
4D v14.3
Overview of JSON commands
|
Type | Description | Comments | |||||||||||
string | Any Unicode character except for " and \
| \ is used for control characters:
| |||||||||||
number | Integer or floating point number | Number similar to a C or Java number, except that the octal and hexadecimal formats are not used | |||||||||||
object | { } | ||||||||||||
array | [ ] | ||||||||||||
boolean | true or false | ||||||||||||
null | null |
JSON objects are defined by braces and can contain an undefined number of name/value pairs, for example:
{ "firstName":"John" , "lastName":"Doe" }
JSON arrays are defined by brackets. Each array can contain an undefined number of objects:
{ "employees": [ { "firstName":"John" , "lastName":"Doe" }, { "firstName":"Anna" , "lastName":"Smith" }, { "firstName":"Peter" , "lastName":"Jones" } ] }
By default, when 4D dates are converted to and from JSON, they take into account the time zone of the machine where the conversion took place (in conformity with JavaScript). For example, in France (GMT+2), converting !23/08/2013! gives you "2013-08-22T22:00:00Z" and vice versa.
You can change this functioning and no longer take the time zone into account, during the implementation of export procedures for example, using the SET DATABASE PARAMETER command.
For more information about converting 4D/JSON dates, refer to Conversion of JavaScript dates.
Product: 4D
Theme: JSON
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)