Struct serde_json::ser::Serializer
[−]
[src]
pub struct Serializer<W, F = CompactFormatter> { // some fields omitted }
A structure for serializing Rust values into JSON.
Methods
impl<W> Serializer<W> where W: Write
fn new(writer: W) -> Self
Creates a new JSON serializer.
impl<'a, W> Serializer<W, PrettyFormatter<'a>> where W: Write
fn pretty(writer: W) -> Self
Creates a new JSON pretty print serializer.
impl<W, F> Serializer<W, F> where W: Write, F: Formatter
fn with_formatter(writer: W, formatter: F) -> Self
Creates a new JSON visitor whose output will be written to the writer specified.
fn into_inner(self) -> W
Unwrap the Writer
from the Serializer
.