armjson

package
v0.90.1 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Unmarshal

func Unmarshal(data []byte, target interface{}, metadata *types.Metadata) error

func UnmarshalFromReader added in v0.84.1

func UnmarshalFromReader(r io.ReadSeeker, target interface{}, metadata *types.Metadata) error

Types

type Kind

type Kind uint8
const (
	KindUnknown Kind = iota
	KindNull
	KindNumber
	KindString
	KindBoolean
	KindArray
	KindObject
	KindComment
)

type MetadataReceiver

type MetadataReceiver interface {
	SetMetadata(m *types.Metadata)
}

type Node

type Node interface {
	Comments() []Node
	Range() Range
	Decode(target interface{}) error
	Kind() Kind
	Content() []Node
	Metadata() types.Metadata
}

type PeekReader

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

func NewPeekReader

func NewPeekReader(reader io.Reader) *PeekReader

func (*PeekReader) Next

func (r *PeekReader) Next() (rune, error)

func (*PeekReader) Peek

func (r *PeekReader) Peek() (rune, error)

func (*PeekReader) Undo

func (r *PeekReader) Undo() error

type Position

type Position struct {
	Line   int
	Column int
}

type Range

type Range struct {
	Start Position
	End   Position
}

type Unmarshaller

type Unmarshaller interface {
	UnmarshalJSONWithMetadata(node Node) error
}

Jump to

Keyboard shortcuts

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