Skip to main content

parse_json

Function parse_json 

Source
pub fn parse_json<T>(bytes: &[u8]) -> Result<T, ModelError>
where T: for<'de> Deserialize<'de>,
Expand description

Deserialize JSON and run validate when the type has one.

ยงErrors

Returns an error on malformed JSON or a failed constraint.