5.2.7 Data types
The following table describes data types supported by JP1/IM API.
Data type |
Description |
---|---|
boolean |
true or false |
int |
32-bit signed integer |
long |
64-bit signed integer |
string |
Text data Unless otherwise specified, a number is handled as a decimal number if dealt with as string type. |
If you use a character listed in the following table as string type in JSON format, use the escape character for it.
Character |
Escaped character |
---|---|
Double quotation mark (") |
\" |
Backslash (\) |
\\ |
Backspace |
\b |
Form feed |
\f |
Line feed |
\n |
Carriage return |
\r |
Tab |
\t |
Dates and times must be specified in the ISO8601 format, as described below. Return values also take the same format.
- Format
YYYY-MM-DDThh:mm:ssTZD
Table 5‒12: Format of the date and time Placeholder
Description
Acceptable value
YYYY
Specifies the year.
1994 to 2099 (year)
MM
Specifies the month.
01 to 12 (month of the year)
DD
Specifies the day.
01 to the last day of the specified month (day of the month)
hh
Specifies the hour.
00 to 23 (hour)
mm
Specifies the minute.
00 to 59 (minute)
ss
Specifies the second.
00 to 59 (second)
TZD
Specifies the time difference between the time zone of the specified value and Coordinated Universal Time (UTC).
-
For UTC
Z
-
For time zones other than UTC
+hh:mm or -hh:mm
-
For example, 2019-03-01 12:00:00 in UTC is represented by 2019-03-01T21:00:00+09:00 in Japan Standard Time, or 2019-03-01T07:00:00-05:00 in US Eastern Standard Time.
In some countries and territories, the daylight saving time must be considered. For example, IM-DD specifies 2019-04-01T08:00:00-04:00 in US Eastern Standard Time (Daylight Saving Time) to represent 2019-04-01 12:00:00 in UTC.