Function serde_json::de::from_reader [] [src]

pub fn from_reader<R, T>(rdr: R) -> Result<T> where R: Read, T: Deserialize

Deserialize an instance of type T from an IO stream of JSON.

This conversion can fail if the structure of the Value does not match the structure expected by T, for example if T is a struct type but the Value contains something other than a JSON map. It can also fail if the structure is correct but T's implementation of Deserialize decides that something is wrong with the data, for example required struct fields are missing from the JSON map or some number is too big to fit in the expected primitive type.