pub fn to_writer<W: Write, T: Serialize + ?Sized>( writer: W, value: &T) -> Result<()>
Serialize the given data structure as JSON into the IO stream.