Documentation
¶
Overview ¶
Package json provides JSON encoding/decoding utilities.
Index ¶
- Variables
- func Decode(body io.ReadCloser, dst interface{}) error
- func DecodeBuffer(buf *bytes.Buffer, dst interface{}) error
- func DecodeBytes(data []byte, dst interface{}) error
- func Encode(value interface{}) string
- func EncodeBuffer(value interface{}) *bytes.Buffer
- func EncodeBytes(value interface{}) []byte
- func EncodeIndentBytes(value interface{}, prefix, indent string) []byte
- func EncodeRaw(value interface{}) json.RawMessage
- func Iterator(filename string) <-chan Record
- type Record
Constants ¶
This section is empty.
Variables ¶
View Source
var Unmarshal = json.Unmarshal
Unmarshal is an alias for json.Unmarshal.
Functions ¶
func Decode ¶
func Decode(body io.ReadCloser, dst interface{}) error
Decode reads and unmarshals from an io.ReadCloser.
func DecodeBuffer ¶
DecodeBuffer unmarshals from a buffer.
func DecodeBytes ¶
DecodeBytes unmarshals from bytes.
func EncodeBuffer ¶
EncodeBuffer marshals to a bytes.Buffer.
func EncodeBytes ¶
func EncodeBytes(value interface{}) []byte
EncodeBytes marshals a value to JSON bytes.
func EncodeIndentBytes ¶
EncodeIndentBytes marshals with custom indentation.
func EncodeRaw ¶
func EncodeRaw(value interface{}) json.RawMessage
EncodeRaw marshals to json.RawMessage.
Types ¶
Click to show internal directories.
Click to hide internal directories.