Function json_canon::to_string

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

Serialize the given value as a String of JSON.

Serialization is performed as specified in RFC 8785.

Errors

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