Reference Guide

JSON encodings
Topics:
JSON base value encodings
JSON list encoding
JSON base value encodings
The following table shows the JSON encodings for each base type:
NOTE: A property that has no value appears as the type null.
Type name JSON
definition
Format after "<name>": Example Notes
short
type: integer
format: int16
<int value> "drive_count":600
N/A
integer
type: integer
format: int32
<int value> "answer": 42
N/A
long
type: integer
format: int64
<int value> "size": 123456789
N/A
float
type: number
format: float
<float value> "progress": 99.9
N/A
double
type: number
format:
double
<float value> "throughput":
123456.78
N/A
string
type: string
<string value> "description":"some
text"
Use \ to escape the quote (")
and control characters.
byte
type: string
format: byte
<base64 encoded
character string>
"bitmask":"c3VyZS4=
"
Base64 encoded byte
sequence.
binary
type: string
format:
binary
<octet sequence string> "checksum":
"1a2b3c4d1234dcba"
Hex encoded byte sequence.
boolean
type: boolean
true|false "force":true
Case insensitive.
date
type: string
format: date
"yyyy-mm-dd" "expiration_date":
"2020-02-02"
As defined by full-date -
RFC3339.
timestamp
type: string
format:
timestamp
"hh:mm:ss[.sss]" "daily_start_time":
"03:30:00"
As defined by partial-time
- RFC3339.
4
JSON encodings 19