sonic_rs::serde

Function from_slice

Source
pub fn from_slice<'a, T>(json: &'a [u8]) -> Result<T>
where T: Deserialize<'a>,
Expand description

Deserialize an instance of type T from bytes of JSON text. If user can guarantee the JSON is valid UTF-8, recommend to use from_slice_unchecked instead.