package decoder
import "github.com/goccy/go-json/internal/decoder"
Index ¶
- Variables
- func AssignValue(src, dst reflect.Value) error
- func ReleaseRuntimeContext(ctx *RuntimeContext)
- func UnsafeNew(t *runtime.Type) unsafe.Pointer
- type BasePathNode
- type Decoder
- type Option
- type OptionFlags
- type Path
- func (p *Path) Field(sel string) (PathNode, bool, error)
- func (p *Path) Get(src, dst reflect.Value) error
- func (p *Path) String() string
- type PathBuilder
- type PathIndexAllNode
- func (n *PathIndexAllNode) Field(fieldName string) (PathNode, bool, error)
- func (n *PathIndexAllNode) Get(src, dst reflect.Value) error
- func (n *PathIndexAllNode) Index(idx int) (PathNode, bool, error)
- func (n *PathIndexAllNode) String() string
- type PathIndexNode
- func (n *PathIndexNode) Field(fieldName string) (PathNode, bool, error)
- func (n *PathIndexNode) Get(src, dst reflect.Value) error
- func (n *PathIndexNode) Index(idx int) (PathNode, bool, error)
- func (n *PathIndexNode) String() string
- type PathNode
- type PathRecursiveNode
- func (n *PathRecursiveNode) Field(fieldName string) (PathNode, bool, error)
- func (n *PathRecursiveNode) Get(src, dst reflect.Value) error
- func (n *PathRecursiveNode) Index(_ int) (PathNode, bool, error)
- func (n *PathRecursiveNode) String() string
- type PathSelectorNode
- func (n *PathSelectorNode) Field(fieldName string) (PathNode, bool, error)
- func (n *PathSelectorNode) Get(src, dst reflect.Value) error
- func (n *PathSelectorNode) Index(idx int) (PathNode, bool, error)
- func (n *PathSelectorNode) String() string
- type PathString
- type QuotePathSelector
- type RuntimeContext
- type Stream
Variables ¶
var (
EmptyInterfaceType = emptyInterfaceType
)
Functions ¶
func AssignValue ¶
func ReleaseRuntimeContext ¶
func ReleaseRuntimeContext(ctx *RuntimeContext)
func UnsafeNew ¶
Types ¶
type BasePathNode ¶
type BasePathNode struct {
// contains filtered or unexported fields
}
type 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 }
func CompileToGetDecoder ¶
func NewPathDecoder ¶
func NewPathDecoder() Decoder
type Option ¶
type Option struct { Flags OptionFlags Context context.Context Path *Path }
type OptionFlags ¶
type OptionFlags uint8
const ( FirstWinOption OptionFlags = 1 << iota ContextOption PathOption )
type Path ¶
type Path struct { RootSelectorOnly bool SingleQuotePathSelector bool DoubleQuotePathSelector bool // contains filtered or unexported fields }
func (*Path) Field ¶
func (*Path) Get ¶
func (*Path) String ¶
type PathBuilder ¶
type PathBuilder struct {
// contains filtered or unexported fields
}
func (*PathBuilder) Build ¶
func (b *PathBuilder) Build(buf []rune) (*Path, error)
type PathIndexAllNode ¶
type PathIndexAllNode struct { *BasePathNode }
func (*PathIndexAllNode) Field ¶
func (n *PathIndexAllNode) Field(fieldName string) (PathNode, bool, error)
func (*PathIndexAllNode) Get ¶
func (n *PathIndexAllNode) Get(src, dst reflect.Value) error
func (*PathIndexAllNode) Index ¶
func (n *PathIndexAllNode) Index(idx int) (PathNode, bool, error)
func (*PathIndexAllNode) String ¶
func (n *PathIndexAllNode) String() string
type PathIndexNode ¶
type PathIndexNode struct { *BasePathNode // contains filtered or unexported fields }
func (*PathIndexNode) Field ¶
func (n *PathIndexNode) Field(fieldName string) (PathNode, bool, error)
func (*PathIndexNode) Get ¶
func (n *PathIndexNode) Get(src, dst reflect.Value) error
func (*PathIndexNode) Index ¶
func (n *PathIndexNode) Index(idx int) (PathNode, bool, error)
func (*PathIndexNode) String ¶
func (n *PathIndexNode) String() string
type 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 }
type PathRecursiveNode ¶
type PathRecursiveNode struct { *BasePathNode // contains filtered or unexported fields }
func (*PathRecursiveNode) Field ¶
func (n *PathRecursiveNode) Field(fieldName string) (PathNode, bool, error)
func (*PathRecursiveNode) Get ¶
func (n *PathRecursiveNode) Get(src, dst reflect.Value) error
func (*PathRecursiveNode) Index ¶
func (n *PathRecursiveNode) Index(_ int) (PathNode, bool, error)
func (*PathRecursiveNode) String ¶
func (n *PathRecursiveNode) String() string
type PathSelectorNode ¶
type PathSelectorNode struct { *BasePathNode // contains filtered or unexported fields }
func (*PathSelectorNode) Field ¶
func (n *PathSelectorNode) Field(fieldName string) (PathNode, bool, error)
func (*PathSelectorNode) Get ¶
func (n *PathSelectorNode) Get(src, dst reflect.Value) error
func (*PathSelectorNode) Index ¶
func (n *PathSelectorNode) Index(idx int) (PathNode, bool, error)
func (*PathSelectorNode) String ¶
func (n *PathSelectorNode) String() string
type PathString ¶
type PathString string
func (PathString) Build ¶
func (s PathString) Build() (*Path, error)
type QuotePathSelector ¶
type QuotePathSelector int
const ( SingleQuotePathSelector QuotePathSelector = 1 DoubleQuotePathSelector QuotePathSelector = 2 )
type RuntimeContext ¶
func TakeRuntimeContext ¶
func TakeRuntimeContext() *RuntimeContext
type Stream ¶
type Stream struct { UseNumber bool DisallowUnknownFields bool Option *Option // contains filtered or unexported fields }
func NewStream ¶
func (*Stream) Buffered ¶
func (*Stream) More ¶
func (*Stream) PrepareForDecode ¶
func (*Stream) Reset ¶
func (s *Stream) Reset()
func (*Stream) Token ¶
func (*Stream) TotalOffset ¶
Source Files ¶
anonymous_field.go array.go assign.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 path.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.10.4
- Published
- Dec 11, 2024
- Platform
- darwin/amd64
- Imports
- 21 packages
- Last checked
- 4 minutes ago –
Tools for package owners.