Skip to main content

decode_json

Function decode_json 

Source
pub fn decode_json<T: DeserializeOwned>(bytes: &[u8]) -> Result<T, String>
Expand description

Decode strict JSON while rejecting duplicate and unknown fields.

ยงErrors

Returns an error when JSON syntax, duplicate keys, trailing data, or the target model is invalid.