Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Codec = NewSerializer()
Codec is an instance of Serializer.
Functions ¶
This section is empty.
Types ¶
type ContentType ¶
type ContentType string
ContentType is a defined type.
const ( // ContentTypeJSON is a json ContentType. ContentTypeJSON ContentType = "application/json" )
func (ContentType) String ¶
func (c ContentType) String() string
String return ContentType as string type.
type Serialization ¶
type Serialization struct { }
Serialization is the default implement of interface Serializer.
func (*Serialization) Decode ¶
func (s *Serialization) Decode(data []byte, obj Object) error
Decode is used to decode obj from date.
func (*Serialization) DecodeFromStream ¶
func (s *Serialization) DecodeFromStream(r io.Reader, obj Object) error
DecodeFromStream is used to decode obj from stream.
func (*Serialization) Encode ¶
func (s *Serialization) Encode(obj Object) ([]byte, error)
Encode is used to encode obj.
func (*Serialization) EncodeToStream ¶
func (s *Serialization) EncodeToStream(w io.Writer, obj Object) error
EncodeToStream is used to encode obj to stream.
Click to show internal directories.
Click to hide internal directories.