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.
pub fn parse_json<T>(bytes: &[u8]) -> Result<T, ModelError>where
T: for<'de> Deserialize<'de>,Deserialize JSON and run validate when the type has one.
Returns an error on malformed JSON or a failed constraint.