mirror of
https://github.com/clearml/clearml-server
synced 2025-01-31 19:06:55 +00:00
10 lines
266 B
Python
10 lines
266 B
Python
import rapidjson
|
|
|
|
|
|
# Dump datetime in ISO format
|
|
# treat "native" datetime objects as UTC
|
|
DATETIME_MODE = rapidjson.DM_ISO8601 | rapidjson.DM_NAIVE_IS_UTC
|
|
|
|
dumps = rapidjson.Encoder(datetime_mode=DATETIME_MODE)
|
|
loads = rapidjson.Decoder(datetime_mode=DATETIME_MODE)
|