ruma_common::canonical_json

Function to_canonical_value

Source
pub fn to_canonical_value<T: Serialize>(
    value: T,
) -> Result<CanonicalJsonValue, CanonicalJsonError>
Available on crate feature canonical-json only.
Expand description

Fallible conversion from any value that impl’s Serialize to a CanonicalJsonValue.