Function to_writer
fn to_writer<T: Serialize, W: Write>(w: W, value: &T) -> Result<(), Error>
Serialize a type implementing Serialize to JSON5 and write it to the given writer.
Errors
Fails if we can't express T in JSON5 (e.g. we try to serialize an object key without an
obvious string representation) or if there's an error writing to the writer.