Versions in this module Expand all Collapse all go1 go1.18.10 Jan 10, 2023 Changes in this version + 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 any) ([]byte, error) + func MarshalIndent(v any, prefix, indent string) ([]byte, error) + func Unmarshal(data []byte, v any) error + func Valid(data []byte) bool + type Decoder struct + func NewDecoder(r io.Reader) *Decoder + func (dec *Decoder) Buffered() io.Reader + func (dec *Decoder) Decode(v any) error + func (dec *Decoder) DisallowUnknownFields() + func (dec *Decoder) InputOffset() int64 + func (dec *Decoder) More() bool + func (dec *Decoder) Token() (Token, error) + func (dec *Decoder) UseNumber() + type Delim rune + func (d Delim) String() string + type Encoder struct + func NewEncoder(w io.Writer) *Encoder + func (enc *Encoder) Encode(v any) error + func (enc *Encoder) SetEscapeHTML(on bool) + func (enc *Encoder) SetIndent(prefix, indent string) + type InvalidUTF8Error struct + S string + func (e *InvalidUTF8Error) Error() string + type InvalidUnmarshalError struct + Type reflect.Type + func (e *InvalidUnmarshalError) Error() string + type Marshaler interface + MarshalJSON func() ([]byte, error) + type MarshalerError struct + Err error + Type reflect.Type + func (e *MarshalerError) Error() string + func (e *MarshalerError) Unwrap() error + type Number string + func (n Number) Float64() (float64, error) + func (n Number) Int64() (int64, error) + func (n Number) String() string + type RawMessage []byte + func (m *RawMessage) UnmarshalJSON(data []byte) error + func (m RawMessage) MarshalJSON() ([]byte, error) + type SyntaxError struct + Offset int64 + func (e *SyntaxError) Error() string + type Token any + type UnmarshalFieldError struct + Field reflect.StructField + Key string + Type reflect.Type + func (e *UnmarshalFieldError) Error() string + type UnmarshalTypeError struct + Field string + Offset int64 + Struct string + Type reflect.Type + Value string + func (e *UnmarshalTypeError) Error() string + type Unmarshaler interface + UnmarshalJSON func([]byte) error + type UnsupportedTypeError struct + Type reflect.Type + func (e *UnsupportedTypeError) Error() string + type UnsupportedValueError struct + Str string + Value reflect.Value + func (e *UnsupportedValueError) Error() string