Documentation
¶
Overview ¶
Package json implements encoding and decoding of JSON as defined in RFC 4627. The mapping between JSON and Go values is described in the documentation for the Marshal and Unmarshal functions.
See "JSON and Go" for an introduction to this package: https://golang.org/doc/articles/json_and_go.html
Index ¶
- func Compact(dst *bytes.Buffer, src []byte) error
- func HTMLEscape(dst *bytes.Buffer, src []byte)
- func Indent(dst *bytes.Buffer, src []byte, prefix, indent string) error
- func Marshal(v interface{}) ([]byte, error)
- func MarshalIndent(v interface{}, prefix, indent string) ([]byte, error)
- func Unmarshal(data []byte, v interface{}) error
- type Decoder
- type Delim
- type Encoder
- type Extension
- func (e *Extension) DecodeConst(name string, value interface{})
- func (e *Extension) DecodeFunc(name string, key string, args ...string)
- func (e *Extension) DecodeKeyed(key string, decode func(data []byte) (interface{}, error))
- func (e *Extension) DecodeTrailingCommas(accept bool)
- func (e *Extension) DecodeUnquotedKeys(accept bool)
- func (e *Extension) EncodeType(sample interface{}, encode func(v interface{}) ([]byte, error))
- func (e *Extension) Extend(ext *Extension)
- type InvalidUTF8Error
- type InvalidUnmarshalError
- type Marshaler
- type MarshalerError