to_writer

Function to_writer 

Source
pub fn to_writer<W, T>(writer: W, value: &T) -> Result<()>
where W: Write, T: Serialize + ?Sized,
Expand description

Serialize the given value as JSON into the IO stream.

Serialization is performed as specified in RFC 8785.

§Errors

Serialization can fail if T’s implementation of Serialize fails.