package decoder

import "github.com/goccy/go-json/internal/decoder"

Index

Functions

func ReleaseRuntimeContext

func ReleaseRuntimeContext(ctx *RuntimeContext)

Types

type Decoder

type Decoder interface {
	Decode(*RuntimeContext, int64, int64, unsafe.Pointer) (int64, error)
	DecodeStream(*Stream, int64, unsafe.Pointer) error
}

func CompileToGetDecoder

func CompileToGetDecoder(typ *runtime.Type) (Decoder, error)

type Option

type Option struct {
	Flags   OptionFlags
	Context context.Context
}

type OptionFlags

type OptionFlags uint8
const (
	FirstWinOption OptionFlags = 1 << iota
	ContextOption
)

type RuntimeContext

type RuntimeContext struct {
	Buf    []byte
	Option *Option
}

func TakeRuntimeContext

func TakeRuntimeContext() *RuntimeContext

type Stream

type Stream struct {
	UseNumber             bool
	DisallowUnknownFields bool
	Option                *Option
	// contains filtered or unexported fields
}

func NewStream

func NewStream(r io.Reader) *Stream

func (*Stream) Buffered

func (s *Stream) Buffered() io.Reader

func (*Stream) More

func (s *Stream) More() bool

func (*Stream) PrepareForDecode

func (s *Stream) PrepareForDecode() error

func (*Stream) Reset

func (s *Stream) Reset()

func (*Stream) Token

func (s *Stream) Token() (interface{}, error)

func (*Stream) TotalOffset

func (s *Stream) TotalOffset() int64

Source Files

anonymous_field.go array.go bool.go bytes.go compile.go compile_norace.go context.go float.go func.go int.go interface.go invalid.go map.go number.go option.go ptr.go slice.go stream.go string.go struct.go type.go uint.go unmarshal_json.go unmarshal_text.go wrapped_string.go

Version
v0.9.10
Published
Jul 15, 2022
Platform
darwin/amd64
Imports
21 packages
Last checked
now

Tools for package owners.