decoder

package
v1.14.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2025 License: Apache-2.0 Imports: 1 Imported by: 53

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

	// 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
)

Functions

This section is empty.

Types

type Decoder

type Decoder = api.Decoder

Decoder is the decoder context object

type MismatchTypeError added in v1.6.0

type MismatchTypeError = api.MismatchTypeError

MismatchTypeError represents mismatching between json and object

type Options added in v1.3.0

type Options = api.Options

Options for decode.

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
)

type StreamDecoder added in v1.3.0

type StreamDecoder = api.StreamDecoder

StreamDecoder is the decoder context object for streaming input.

type SyntaxError

type SyntaxError = api.SyntaxError

SyntaxError represents json syntax error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL