pub fn write<T: ?Sized + Serialize>(w: impl Write, x: &T) -> Result<()>
json
parse
Serialize the value into JSON and write into the writer