Documentation
¶
Overview ¶
Package json provides JSON encoding/decoding utilities.
Index ¶
- Variables
- func Decode(body io.ReadCloser, dst any) error
- func DecodeBuffer(buf *bytes.Buffer, dst any) error
- func DecodeBytes(data []byte, dst any) error
- func Encode(value any) string
- func EncodeBuffer(value any) *bytes.Buffer
- func EncodeBytes(value any) []byte
- func EncodeIndentBytes(value any, prefix, indent string) []byte
- func EncodeRaw(value any) 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 any) error
Decode reads and unmarshals from an io.ReadCloser.
func DecodeBuffer ¶
DecodeBuffer unmarshals from a buffer.
func EncodeBuffer ¶
EncodeBuffer marshals to a bytes.Buffer.
func EncodeIndentBytes ¶
EncodeIndentBytes marshals with custom indentation.
Types ¶
Click to show internal directories.
Click to hide internal directories.