Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Default is the default JSON codec. Default = &JSONCodec{ JSONEncoder: DefaultEncoder, JSONDecoder: DefaultDecoder, } )
View Source
var ( // DefaultDecoder is the default decoder. DefaultDecoder = &JSONDecoder{} )
View Source
var ( // DefaultEncoder is the default encoder. DefaultEncoder = &JSONEncoder{} )
Functions ¶
This section is empty.
Types ¶
type JSONDecoder ¶
type JSONDecoder struct { }
JSONDecoder decodes JSON.
func (JSONDecoder) Decode ¶
func (d JSONDecoder) Decode(data []byte, v interface{}) error
Decode decodes JSON.
type JSONEncoder ¶
type JSONEncoder struct{}
JSONEncoder encodes a value to JSON.
func (JSONEncoder) Encode ¶
func (e JSONEncoder) Encode(v interface{}) ([]byte, error)
Encode encodes a value to indented. JSON.
Click to show internal directories.
Click to hide internal directories.