Function usdt_impl::to_json

source ·
pub fn to_json<T>(x: &T) -> Result<String, Error>
where T: ?Sized + Serialize,
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.