Function htrpc::json::serialize [] [src]

pub fn serialize<S, T>(value: T, serializer: S) -> Result<S::Ok, S::Error> where
    T: Serialize,
    S: Serializer

Serializes the value as a JSON string.

This function can be used as the value of the serde(serialize_with) attribute (i.e., #[serde(serialize_with = "htrpc::json::serialize")]).