Module serde_json::ser [] [src]

JSON Serialization

This module provides for JSON serialization with the type Serializer.

Structs

CompactFormatter

This structure compacts a JSON value with no extra whitespace.

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.

Traits

Formatter

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

Functions

escape_str

Serializes and escapes a &str into a JSON string.

to_string

Encode the specified struct into a json String buffer.

to_string_pretty

Encode the specified struct into a json String buffer.

to_vec

Encode the specified struct into a json [u8] buffer.

to_vec_pretty

Encode the specified struct into a json [u8] buffer.

to_writer

Encode the specified struct into a json [u8] writer.

to_writer_pretty

Encode the specified struct into a json [u8] writer.