Fields¶
Encoding¶
Supported field types¶
- None
- str
- unicode
- int
- float
- list
- tuple
- dict
- set
datetime.date
datetime.datetime
(with timezone or without)JSONObject
Note
Types like set, tuple will be converted into a list during the serialization process and can’t be decoded into their original types.
Decoding¶
Python Type | JSON Type | JSON Example Value |
---|---|---|
None | null | |
str | string | |
unicode | string | |
int | number | 12 |
float | number | 12.24 |
list | array | |
set | array | |
tuple | array | |
dict | object | {“firstName”: “”} |
datetime.date |
str | “2018-08-06” (ISO 8601 formatted date) |
datetime.datetime |
str | “2018-08-06T18:00:00Z” / “2018-08-06T18:00:00+0100” (ISO 8601 formatted datetime) |