rustc_serialize::json

Function as_json

Source
pub fn as_json<T: Encodable>(t: &T) -> AsJson<'_, T>
Expand description

Create an AsJson wrapper which can be used to print a value as JSON on-the-fly via write!