pub fn to_json<T>(x: &T) -> Result<String, Error>Expand description
Convert a serializable type into a JSON string, if possible.
NOTE: This is essentially a re-export of the serde_json::to_string function, used to avoid
foisting an explicity dependency on that crate in user’s Cargo.toml.