Function json_canon::to_vec

source ·
pub fn to_vec<T>(value: &T) -> Result<Vec<u8>>where
    T: Serialize + ?Sized,
Expand description

Serialize the given value as a JSON byte vector.

Serialization is performed as specified in RFC 8785.

Errors

Serialization can fail if T’s implementation of Serialize fails.