pub fn serialize<T, S>(value: &T, serializer: S) -> Result<S::Ok, S::Error>where
T: Serialize,
S: Serializer,Expand description
Serialize value as a JSON string.
ยงErrors
Returns a serialization error if value cannot be serialized to JSON or
if the serializer rejects the resulting string.