pub fn write_json<T: Serialize + ?Sized>(
value: &T,
f: &mut Formatter<'_>,
) -> ResultExpand description
Writes value to f as compact JSON.
When value cannot be serialized, writes
Error serializing to JSON: <reason> instead.
ยงErrors
Returns fmt::Error only when the formatter itself fails to write.