Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MarshalFunc = json.Marshal MarshalIndentFunc = json.MarshalIndent UnmarshalFunc = json.Unmarshal NewEncoderFunc = func(w io.Writer) Encoder { return json.NewEncoder(w) } NewDecoderFunc = func(r io.Reader) Decoder { return json.NewDecoder(r) } )
Functions ¶
func MarshalIndent ¶
MarshalIndent is like Marshal but applies Indent to format the output.
Types ¶
type Decoder ¶
type Decoder interface {
Decode(v interface{}) error
}
Decoder decodes a byte sequence.
func NewDecoder ¶
NewDecoder returns a new decoder that reads from r.
type Encoder ¶
type Encoder interface {
Encode(v interface{}) error
}
Encoder encodes into byte sequence.
func NewEncoder ¶
NewEncoder returns a new encoder that writes to w.
type WrapDecoder ¶
type WrapDecoder struct {
D Decoder
}
func (*WrapDecoder) Decode ¶
func (w *WrapDecoder) Decode(v interface{}) error
Decode reads the next JSON-encoded value from its input and stores it in the value pointed to by v.
type WrapEncoder ¶
type WrapEncoder struct {
E Encoder
}
func (*WrapEncoder) Encode ¶
func (w *WrapEncoder) Encode(v interface{}) error
Encode encodes into byte sequence.
Click to show internal directories.
Click to hide internal directories.