Skip to main content

Module writer

Module writer 

Source
Expand description

Msgpack serialization for serde_json::Value and nodedb_types::Value.

Value::DateTime and Value::NaiveDateTime are written as the instant ext (fixext8, see instant_ext). Duration, Decimal, and Geometry are written as strings, except a Decimal that holds a u64 above i64::MAX, which is a uint64. Vector is a float64 array, ArrayCell a map, and Range / Record are nil.

Functionsยง

json_to_msgpack
Serialize a serde_json::Value to MessagePack bytes.
json_to_msgpack_or_empty
Serialize a serde_json::Value to MessagePack bytes, returning an empty msgpack map (0x80) on failure.
value_to_msgpack
Serialize a nodedb_types::Value to standard MessagePack bytes.