Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CSV = &csvEncoder{}
CSV holds a csv encoder instance implementing Marshaller.
View Source
var JSON = &jsonEncoder{}
JSON holds a json encoder instance implementing Marshaller.
View Source
var ProtoText = &protoTextEncoder{}
ProtoText holds a proto text encoder instance implementing Marshaller.
View Source
var RAW = &rawEncoder{}
RAW holds a raw encoder instance implementing Marshaller.
Functions ¶
Types ¶
type Marshaller ¶
type Marshaller interface { // Marshal marshals the given data structure to a certain format and returns the representation in bytes. Marshal(v interface{}) ([]byte, error) // Unmarshal parses a byte representation of a given data in a certain format and loads v with matching parsed values. Unmarshal(data []byte, v interface{}) error }
Marshaller marshals and unmarshals data to/from specific formats.
type WriterEncoder ¶
type WriterEncoder interface { // Write encodes v in a certain format and writes it to w. Write(w io.Writer, v interface{}) error }
WriterEncoder encodes and writes data to a Writer.
Click to show internal directories.
Click to hide internal directories.