Skip to content

Expose a way to read an io::Read into string and deserialize from the string #407

Open
@dtolnay

Description

@dtolnay

rwf2/Rocket#547 wants to do the following two steps but get a single serde_json::Error out, rather than an io::Error and a serde_json::Error.

let mut s = String::new();
data.read_to_string(&mut s)?;
let t = serde_json::from_str(&s)?;

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions