pub fn to_json_writer<T, W>(value: &T, writer: W) -> Result<()>where T: ?Sized + Serialize, W: Write,
Converts the value to a JSON string and writes it to the writer.