pub trait FromJson: for<'de> Deserialize<'de> {
    fn from_json(json: &impl AsRef<str>) -> Result<Self, Error> { ... }
    fn from_json_slice(json: &impl AsRef<[u8]>) -> Result<Self, Error> { ... }
    fn from_json_value(json: Value) -> Result<Self, Error> { ... }
}
Expand description

A convenience-trait for types that can be deserialized from JSON.

Provided Methods

Deserialize Self from a string of JSON text.

Deserialize Self from bytes of JSON text.

Deserialize Self from a [serde_json::Value].

Implementors