Module ser

Source
Expand description

Serialize a Rust data structure into JSON data.

Structsยง

CompactFormatter
This structure compacts a JSON value with no extra whitespace.
MapKeySerializer ๐Ÿ”’
PrettyFormatter
This structure pretty prints a JSON value to make it human readable.
Serializer
A structure for serializing Rust values into JSON.

Enumsยง

CharEscape
Represents a character escape code in a type-safe manner.

Constantsยง

BB ๐Ÿ”’
BS ๐Ÿ”’
FF ๐Ÿ”’
NN ๐Ÿ”’
QU ๐Ÿ”’
RR ๐Ÿ”’
TT ๐Ÿ”’
UU ๐Ÿ”’
__ ๐Ÿ”’

Staticsยง

ESCAPE ๐Ÿ”’

Traitsยง

Formatter
This trait abstracts away serializing the JSON control characters, which allows the user to optionally pretty print the JSON output.

Functionsยง

float_key_must_be_finite ๐Ÿ”’
format_escaped_str ๐Ÿ”’
format_escaped_str_contents ๐Ÿ”’
indent ๐Ÿ”’
key_must_be_a_string ๐Ÿ”’
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.