pub fn from_slice<'de, T>(
flavor: Flavor,
input: &'de [u8],
) -> Result<T, Located<'de, Error>>where
T: Deserialize<'de>,Expand description
Deserialize a value from a slice of bytes.
This is a convenience function to deserialize a value with some sensible defaults. In particular, this uses a fixed recursion depth of 64. If you are getting a MaxRecursion error, please use Deserializer directly.
This function will return UnescapeBufferFull if the input contains escaped strings or escaped bytes. Use from_slice_escaped instead, or opt-out of unescaping with Escaped.
For deserializing from strings, see from_str.