Expand description
Reexport for serde_json
This is mainly useful to avoid having to specify another dependency.
It’s also somewhat nicer to write json::Value instead of serde_json::Value.
Modules§
- de
- Deserialize JSON data to a Rust data structure.
- error
- When serializing or deserializing JSON goes wrong.
- map
- A map of String to serde_json::Value.
- ser
- Serialize a Rust data structure into JSON data.
- value
- The Value enum, a loosely typed way of representing any valid JSON value.
Macros§
- json
- Construct a
serde_json::Valuefrom a JSON literal.
Structs§
- Deserializer
- A structure that deserializes JSON into Rust values.
- Error
- This type represents all possible errors that can occur when serializing or deserializing JSON data.
- Map
- Represents a JSON key/value type.
- Number
- Represents a JSON number, whether integer or floating point.
- Serializer
- A structure for serializing Rust values into JSON.
- Stream
Deserializer - Iterator that deserializes a stream into multiple JSON values.
Enums§
- Value
- Represents any valid JSON value.
Functions§
- from_
reader - Deserialize an instance of type
Tfrom an I/O stream of JSON. - from_
slice - Deserialize an instance of type
Tfrom bytes of JSON text. - from_
str - Deserialize an instance of type
Tfrom a string of JSON text. - from_
value - Interpret a
serde_json::Valueas an instance of typeT. - 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
Tintoserde_json::Valuewhich 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.
Type Aliases§
- Result
- Alias for a
Resultwith the error typeserde_json::Error.