[go: up one dir, main page]

Module serde

Source
Expand description

Serde between JSON text and Rust data structure.

Structs§

Deserializer
A structure that deserializes JSON into Rust values.
Number
Represents a JSON number, whether integer or floating point.
RawNumber
Represents a JSON number with arbitrary precision, the underlying representation of a string, like as Golang json.Number.
Serializer
A structure for serializing Rust values into JSON.
StreamDeserializer
An iterator that deserializes a json stream into multiple T values.

Traits§

JsonNumberTrait
Number trait for both Number and RawNumber.

Functions§

from_reader
Deserialize an instance of type T from a Reader
from_slice
Deserialize an instance of type T from bytes of JSON text. If user can guarantee the JSON is valid UTF-8, recommend to use from_slice_unchecked instead.
from_slice_unchecked
Deserialize an instance of type T from bytes of JSON text.
from_str
Deserialize an instance of type T from a string of JSON text.
to_lazyvalue
Serialize the given data structure as a OwnedLazyValue of JSON.
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_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.