decoder
v1.15.5
github.com/bytedance/sonic/decoder
Documentation
pkg.go.dev ↗Variables
NewDecoder (5 declarations)
var ( // NewDecoder creates a new decoder instance. NewDecoder = api.NewDecoder // NewStreamDecoder adapts to encoding/json.NewDecoder API. // // NewStreamDecoder returns a new decoder that reads from r. NewStreamDecoder = api.NewStreamDecoder // Pretouch compiles vt ahead-of-time to avoid JIT compilation on-the-fly, in // order to reduce the first-hit latency. // // Opts are the compile options, for example, "option.WithCompileRecursiveDepth" is // a compile option to set the depth of recursive compile for the nested struct type. Pretouch = api.Pretouch // PretouchMany compiles all vts ahead-of-time to avoid JIT compilation on-the-fly, // in order to reduce the first-hit latency. PretouchMany = api.PretouchMany // Skip skips only one json value, and returns first non-blank character position and its ending position if it is valid. // Otherwise, returns negative error code using start and invalid character position using end Skip = api.Skip )
Types
Decoder
type Decoder = api.Decoder
Decoder is the decoder context object
MismatchTypeError
type MismatchTypeError = api.MismatchTypeError
MismatchTypeError represents mismatching between json and object
Options
type Options = api.Options
Options for decode.
OptionUseInt64 (8 declarations)
const ( OptionUseInt64 Options = api.OptionUseInt64 OptionUseNumber Options = api.OptionUseNumber OptionUseUnicodeErrors Options = api.OptionUseUnicodeErrors OptionDisableUnknown Options = api.OptionDisableUnknown OptionCopyString Options = api.OptionCopyString OptionValidateString Options = api.OptionValidateString OptionNoValidateJSON Options = api.OptionNoValidateJSON OptionCaseSensitive Options = api.OptionCaseSensitive )
StreamDecoder
type StreamDecoder = api.StreamDecoder
StreamDecoder is the decoder context object for streaming input.
SyntaxError
type SyntaxError = api.SyntaxError
SyntaxError represents json syntax error