Function json_parse_from_slice

Source
pub fn json_parse_from_slice<T>(data: &[u8]) -> ResultSerdeJsonError<T>
Expand description

Parses a JSON value from a byte slice.

§Arguments

  • data - A byte slice containing JSON data

§Returns

  • Ok(T) if parsing succeeds, where T is the deserialized value
  • Err(SerdeJsonError) if parsing fails