jsonx

package
v0.0.0-rc8 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDefaultDecoder

func NewDefaultDecoder(r io.Reader) *json.Decoder

NewDefaultDecoder constructs a default JSON decoder for Data Transfer.

func Unmarshal

func Unmarshal(body []byte, result any) error

Unmarshal decodes body by a default JSON decoder for Data Transfer.

Types

type JSONNull

type JSONNull struct{}

JSONNull denotes a JSON 'null' value. It represents pure 'null' JSON value, not a value inside a JSON object or array. A value inside a JSON object is just golang's 'nil'

func (JSONNull) Equals

func (n JSONNull) Equals(o any) bool

func (JSONNull) MarshalJSON

func (n JSONNull) MarshalJSON() ([]byte, error)

func (JSONNull) MarshalYSON

func (n JSONNull) MarshalYSON() ([]byte, error)

type ValueDecoder

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

ValueDecoder is a decoder which deserializes JSONs into the Data Transfer's JSON representation

func NewValueDecoder

func NewValueDecoder(base *json.Decoder) *ValueDecoder

NewValueDecoder constructs a decoder which deserializes JSONs into the Data Transfer's JSON representation

func (*ValueDecoder) Decode

func (d *ValueDecoder) Decode() (any, error)

Decode uses the decoder from the constructor to deserialize the input into a Data Transfer JSON

Jump to

Keyboard shortcuts

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