Versions in this module Expand all Collapse all v0 v0.1.0 Mar 19, 2024 Changes in this version + var SkipFunc = errors.New("json: skip function") + func GetOption[T any](opts Options, setter func(T) Options) (T, bool) + func Marshal(in any, opts ...Options) (out []byte, err error) + func MarshalEncode(out *jsontext.Encoder, in any, opts ...Options) (err error) + func MarshalWrite(out io.Writer, in any, opts ...Options) (err error) + func Unmarshal(in []byte, out any, opts ...Options) (err error) + func UnmarshalDecode(in *jsontext.Decoder, out any, opts ...Options) (err error) + func UnmarshalRead(in io.Reader, out any, opts ...Options) (err error) + type MarshalerV1 interface + MarshalJSON func() ([]byte, error) + type MarshalerV2 interface + MarshalJSONV2 func(*jsontext.Encoder, Options) error + type Marshalers = typedMarshalers + func MarshalFuncV1[T any](fn func(T) ([]byte, error)) *Marshalers + func MarshalFuncV2[T any](fn func(*jsontext.Encoder, T, Options) error) *Marshalers + func NewMarshalers(ms ...*Marshalers) *Marshalers + type Options = jsonopts.Options + func DefaultOptionsV2() Options + func Deterministic(v bool) Options + func DiscardUnknownMembers(v bool) Options + func FormatNilMapAsNull(v bool) Options + func FormatNilSliceAsNull(v bool) Options + func JoinOptions(srcs ...Options) Options + func MatchCaseInsensitiveNames(v bool) Options + func RejectUnknownMembers(v bool) Options + func StringifyNumbers(v bool) Options + func WithMarshalers(v *Marshalers) Options + func WithUnmarshalers(v *Unmarshalers) Options + type SemanticError struct + ByteOffset int64 + Err error + GoType reflect.Type + JSONKind jsontext.Kind + JSONPointer string + func (e *SemanticError) Error() string + func (e *SemanticError) Unwrap() error + type UnmarshalerV1 interface + UnmarshalJSON func([]byte) error + type UnmarshalerV2 interface + UnmarshalJSONV2 func(*jsontext.Decoder, Options) error + type Unmarshalers = typedUnmarshalers + func NewUnmarshalers(us ...*Unmarshalers) *Unmarshalers + func UnmarshalFuncV1[T any](fn func([]byte, T) error) *Unmarshalers + func UnmarshalFuncV2[T any](fn func(*jsontext.Decoder, T, Options) error) *Unmarshalers