Skip to main content

Module json

Module json 

Source
Expand description

Serialization helpers for raw and canonical JSON values.

The conversion functions bridge Serde values to Ruma’s raw and canonical representations. A generic deserializer adapts string-backed fields to types implementing FromStr.

Structs§

Counter 🔒
An io::Write sink that counts bytes without buffering them.

Functions§

deserialize_from_str
Deserializes a string and parses it through FromStr.
serialized_len
Measures the length of a value’s JSON serialization.
to_canonical_object
Converts a serializable value into a canonical JSON object.
to_raw
Serializes a value into Ruma’s raw JSON representation.