Search and commands

↑ ↓ to select · Enter to open · Esc to close

Type to search packages.

decoder

v0.0.0-20250722074740-d61791e4306e
github.com/going/json/internal/decoder

Documentation

pkg.go.dev ↗

Table of contents

↓ to select · Enter to jump· Shift+Enter for source

58 matches

Top ↑

Variables

EmptyInterfaceType

var (
	EmptyInterfaceType = emptyInterfaceType
)

Functions

AssignValue

func AssignValue(src, dst reflect.Value) error

ReleaseRuntimeContext

func ReleaseRuntimeContext(ctx *RuntimeContext)

UnsafeNew

func UnsafeNew(t *runtime.Type) unsafe.Pointer

Types

BasePathNode

type BasePathNode struct {
	// contains filtered or unexported fields
}

Decoder

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

CompileToGetDecoder

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

NewPathDecoder

func NewPathDecoder() Decoder

Option

type Option struct {
	Flags   OptionFlags
	Context context.Context
	Path    *Path
}

OptionFlags

type OptionFlags uint8

FirstWinOption (3 declarations)

const (
	FirstWinOption OptionFlags = 1 << iota
	ContextOption
	PathOption
)

Path

type Path struct {
	RootSelectorOnly        bool
	SingleQuotePathSelector bool
	DoubleQuotePathSelector bool
	// contains filtered or unexported fields
}

Path.Field

func (p *Path) Field(sel string) (PathNode, bool, error)

Path.Get

func (p *Path) Get(src, dst reflect.Value) error

Path.String

func (p *Path) String() string

PathBuilder

type PathBuilder struct {
	// contains filtered or unexported fields
}

PathBuilder.Build

func (b *PathBuilder) Build(buf []rune) (*Path, error)

PathIndexAllNode

type PathIndexAllNode struct {
	*BasePathNode
}

PathIndexAllNode.Field

func (n *PathIndexAllNode) Field(fieldName string) (PathNode, bool, error)

PathIndexAllNode.Get

func (n *PathIndexAllNode) Get(src, dst reflect.Value) error

PathIndexAllNode.Index

func (n *PathIndexAllNode) Index(idx int) (PathNode, bool, error)

PathIndexAllNode.String

func (n *PathIndexAllNode) String() string

PathIndexNode

type PathIndexNode struct {
	*BasePathNode
	// contains filtered or unexported fields
}

PathIndexNode.Field

func (n *PathIndexNode) Field(fieldName string) (PathNode, bool, error)

PathIndexNode.Get

func (n *PathIndexNode) Get(src, dst reflect.Value) error

PathIndexNode.Index

func (n *PathIndexNode) Index(idx int) (PathNode, bool, error)

PathIndexNode.String

func (n *PathIndexNode) String() string

PathNode

type PathNode interface {
	fmt.Stringer
	Index(idx int) (PathNode, bool, error)
	Field(fieldName string) (PathNode, bool, error)
	Get(src, dst reflect.Value) error
	// contains filtered or unexported methods
}

PathRecursiveNode

type PathRecursiveNode struct {
	*BasePathNode
	// contains filtered or unexported fields
}

PathRecursiveNode.Field

func (n *PathRecursiveNode) Field(fieldName string) (PathNode, bool, error)

PathRecursiveNode.Get

func (n *PathRecursiveNode) Get(src, dst reflect.Value) error

PathRecursiveNode.Index

func (n *PathRecursiveNode) Index(_ int) (PathNode, bool, error)

PathRecursiveNode.String

func (n *PathRecursiveNode) String() string

PathSelectorNode

type PathSelectorNode struct {
	*BasePathNode
	// contains filtered or unexported fields
}

PathSelectorNode.Field

func (n *PathSelectorNode) Field(fieldName string) (PathNode, bool, error)

PathSelectorNode.Get

func (n *PathSelectorNode) Get(src, dst reflect.Value) error

PathSelectorNode.Index

func (n *PathSelectorNode) Index(idx int) (PathNode, bool, error)

PathSelectorNode.String

func (n *PathSelectorNode) String() string

PathString

type PathString string

PathString.Build

func (s PathString) Build() (*Path, error)

QuotePathSelector

type QuotePathSelector int

SingleQuotePathSelector (2 declarations)

const (
	SingleQuotePathSelector QuotePathSelector = 1
	DoubleQuotePathSelector QuotePathSelector = 2
)

RuntimeContext

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

TakeRuntimeContext

func TakeRuntimeContext() *RuntimeContext

Stream

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

NewStream

func NewStream(r io.Reader) *Stream

Stream.Buffered

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

Stream.More

func (s *Stream) More() bool

Stream.PrepareForDecode

func (s *Stream) PrepareForDecode() error

Stream.Reset

func (s *Stream) Reset()

Stream.Token

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

Stream.TotalOffset

func (s *Stream) TotalOffset() int64

Dependency graph