json

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: GPL-2.0 Imports: 8 Imported by: 115

Documentation

Index

Constants

View Source
const (
	CommentKindLine          = json.CommentKindLine
	CommentKindHash          = json.CommentKindHash
	CommentKindBlock         = json.CommentKindBlock
	CommentPlacementLeading  = json.CommentPlacementLeading
	CommentPlacementTrailing = json.CommentPlacementTrailing
	CommentPlacementInner    = json.CommentPlacementInner
	CommentPathKey           = json.CommentPathKey
	CommentPathIndex         = json.CommentPathIndex
)

Variables

View Source
var (
	Marshal    = json.Marshal
	Unmarshal  = json.Unmarshal
	NewEncoder = json.NewEncoder
	NewDecoder = json.NewDecoder
)
View Source
var (
	MarshalContext                        = json.MarshalContext
	UnmarshalContext                      = json.UnmarshalContext
	NewEncoderContext                     = json.NewEncoderContext
	NewDecoderContext                     = json.NewDecoderContext
	UnmarshalContextDisallowUnknownFields = json.UnmarshalContextDisallowUnknownFields
)
View Source
var UnmarshalDisallowUnknownFields = json.UnmarshalDisallowUnknownFields

Functions

func NewCommentFilter deprecated

func NewCommentFilter(reader io.Reader) io.Reader

Deprecated: use new contextjson instead

func UnmarshalExtended

func UnmarshalExtended[T any](content []byte) (T, error)

func UnmarshalExtendedContext added in v0.6.0

func UnmarshalExtendedContext[T any](ctx context.Context, content []byte) (T, error)

Types

type Comment added in v0.9.0

type Comment = json.Comment

type CommentFilter

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

func (*CommentFilter) Read

func (v *CommentFilter) Read(b []byte) (int, error)

type CommentKind added in v0.9.0

type CommentKind = json.CommentKind

type CommentMarshaler added in v0.9.0

type CommentMarshaler = json.CommentMarshaler

type CommentPath added in v0.9.0

type CommentPath = json.CommentPath

type CommentPathKind added in v0.9.0

type CommentPathKind = json.CommentPathKind

type CommentPathSegment added in v0.9.0

type CommentPathSegment = json.CommentPathSegment

type CommentPlacement added in v0.9.0

type CommentPlacement = json.CommentPlacement

type CommentPosition added in v0.9.0

type CommentPosition = json.CommentPosition

type CommentSet added in v0.9.0

type CommentSet = json.CommentSet

type CommentUnmarshaler added in v0.9.0

type CommentUnmarshaler = json.CommentUnmarshaler

type ContextMarshaler added in v0.6.0

type ContextMarshaler interface {
	MarshalJSONContext(ctx context.Context) ([]byte, error)
}

type ContextUnmarshaler added in v0.6.0

type ContextUnmarshaler interface {
	UnmarshalJSONContext(ctx context.Context, content []byte) error
}

type Decoder

type Decoder = json.Decoder

type Delim

type Delim = json.Delim

type Encoder

type Encoder = json.Encoder

type RawMessage

type RawMessage = json.RawMessage

type SyntaxError

type SyntaxError = json.SyntaxError

type Token

type Token = json.Token

Directories

Path Synopsis
internal
contextjson
Package json implements encoding and decoding of JSON as defined in RFC 7159.
Package json implements encoding and decoding of JSON as defined in RFC 7159.

Jump to

Keyboard shortcuts

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