Skip to main content

to_writer

Function to_writer 

Source
pub fn to_writer<W: Write, T: Serialize>(w: W, v: T) -> Result<()>
Available on crate feature serde only.
Expand description

Serializes the given data into the provided writer as a JSON.

§Errors

Returns error if T’s Serialize implementation fails, T contains non-string map keys, or an I/O error occurs while writing.