Expand description
Re-exports of serde_json
serialization functions.
This module re-exports the generic serde serialization functions
so that one can serialize data structures other than Root
without
being bound to a specific version of serde_json
.
Functionsยง
- to_
string - Serialize the given data structure as a String of JSON.
- to_
string_ pretty - Serialize the given data structure as a pretty-printed String of JSON.
- to_
value - Convert a
T
intoserde_json::Value
which is an enum that can represent any valid JSON data. - to_vec
- Serialize the given data structure as a JSON byte vector.
- to_
vec_ pretty - Serialize the given data structure as a pretty-printed JSON byte vector.
- to_
writer - Serialize the given data structure as JSON into the I/O stream.
- to_
writer_ pretty - Serialize the given data structure as pretty-printed JSON into the I/O stream.