Versions in this module Expand all Collapse all v0 v0.0.1 Nov 8, 2022 Changes in this version + var DefaultColorScheme = &ColorScheme + var FieldQueryFromContext = encoder.FieldQueryFromContext + var SetFieldQueryToContext = encoder.SetFieldQueryToContext + 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 MarshalContext(ctx context.Context, v interface{}, optFuncs ...EncodeOptionFunc) ([]byte, error) + func MarshalIndent(v interface{}, prefix, indent string) ([]byte, error) + func MarshalIndentWithOption(v interface{}, prefix, indent string, optFuncs ...EncodeOptionFunc) ([]byte, error) + func MarshalNoEscape(v interface{}) ([]byte, error) + func MarshalWithOption(v interface{}, optFuncs ...EncodeOptionFunc) ([]byte, error) + func Unmarshal(data []byte, v interface{}) error + func UnmarshalContext(ctx context.Context, data []byte, v interface{}, optFuncs ...DecodeOptionFunc) error + func UnmarshalNoEscape(data []byte, v interface{}, optFuncs ...DecodeOptionFunc) error + func UnmarshalWithOption(data []byte, v interface{}, optFuncs ...DecodeOptionFunc) error + func Valid(data []byte) bool + type ColorFormat = encoder.ColorFormat + type ColorScheme = encoder.ColorScheme + type DecodeOption = decoder.Option + type DecodeOptionFunc func(*DecodeOption) + func DecodeFieldPriorityFirstWin() DecodeOptionFunc + type Decoder struct + func NewDecoder(r io.Reader) *Decoder + func (d *Decoder) Buffered() io.Reader + func (d *Decoder) Decode(v interface{}) error + func (d *Decoder) DecodeContext(ctx context.Context, v interface{}) error + func (d *Decoder) DecodeWithOption(v interface{}, optFuncs ...DecodeOptionFunc) error + func (d *Decoder) DisallowUnknownFields() + func (d *Decoder) InputOffset() int64 + func (d *Decoder) More() bool + func (d *Decoder) Token() (Token, error) + func (d *Decoder) UseNumber() + type Delim = json.Delim + type EncodeOption = encoder.Option + type EncodeOptionFunc func(*EncodeOption) + func Colorize(scheme *ColorScheme) EncodeOptionFunc + func Debug() EncodeOptionFunc + func DebugWith(w io.Writer) EncodeOptionFunc + func DisableHTMLEscape() EncodeOptionFunc + func DisableNormalizeUTF8() EncodeOptionFunc + func UnorderedMap() EncodeOptionFunc + type Encoder struct + func NewEncoder(w io.Writer) *Encoder + func (e *Encoder) Encode(v interface{}) error + func (e *Encoder) EncodeContext(ctx context.Context, v interface{}, optFuncs ...EncodeOptionFunc) error + func (e *Encoder) EncodeWithOption(v interface{}, optFuncs ...EncodeOptionFunc) error + func (e *Encoder) SetEscapeHTML(on bool) + func (e *Encoder) SetIndent(prefix, indent string) + type FieldQuery = encoder.FieldQuery + func BuildFieldQuery(fields ...FieldQueryString) (*FieldQuery, error) + type FieldQueryString = encoder.FieldQueryString + type InvalidUTF8Error = errors.InvalidUTF8Error + type InvalidUnmarshalError = errors.InvalidUnmarshalError + type Marshaler interface + MarshalJSON func() ([]byte, error) + type MarshalerContext interface + MarshalJSON func(context.Context) ([]byte, error) + type MarshalerError = errors.MarshalerError + type Number = json.Number + type RawMessage = json.RawMessage + type SubFieldQuery struct + func BuildSubFieldQuery(name string) *SubFieldQuery + func (q *SubFieldQuery) Fields(fields ...FieldQueryString) FieldQueryString + type SyntaxError = errors.SyntaxError + type Token = json.Token + type UnmarshalFieldError = errors.UnmarshalFieldError + type UnmarshalTypeError = errors.UnmarshalTypeError + type Unmarshaler interface + UnmarshalJSON func([]byte) error + type UnmarshalerContext interface + UnmarshalJSON func(context.Context, []byte) error + type UnsupportedTypeError = errors.UnsupportedTypeError + type UnsupportedValueError = errors.UnsupportedValueError