json

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssignNextBytesToken added in v1.1.0

func AssignNextBytesToken(dst *[]byte, dec *Decoder) error

func AssignNextStringToken added in v1.1.0

func AssignNextStringToken(dst **string, dec *Decoder) error

func DecoderSettings

func DecoderSettings(inUseNumber bool)

Sets the global configuration for json decoding

func Engine added in v1.1.0

func Engine() string

func Marshal

func Marshal(v interface{}) ([]byte, error)

Marshal is just a proxy for "encoding/json".Marshal

func MarshalIndent

func MarshalIndent(v interface{}, prefix, indent string) ([]byte, error)

MarshalIndent is just a proxy for "encoding/json".MarshalIndent

func NewDecoder

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

NewDecoder respects the values specified in DecoderSettings, and creates a Decoder that has certain features turned on/off

func NewEncoder

func NewEncoder(w io.Writer) *json.Encoder

func ReadNextStringToken added in v1.1.0

func ReadNextStringToken(dec *Decoder) (string, error)

func Unmarshal

func Unmarshal(b []byte, v interface{}) error

Unmarshal respects the values specified in DecoderSettings, and uses a Decoder that has certain features turned on/off

Types

type Decoder added in v1.1.0

type Decoder = json.Decoder

type Delim added in v1.1.0

type Delim = json.Delim

type Encoder added in v1.1.0

type Encoder = json.Encoder

type Marshaler added in v1.1.0

type Marshaler = json.Marshaler

type Number

type Number = json.Number

type RawMessage

type RawMessage = json.RawMessage

type Registry added in v1.1.2

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

func NewRegistry added in v1.1.2

func NewRegistry() *Registry

func (*Registry) Decode added in v1.1.2

func (r *Registry) Decode(dec *Decoder, name string) (interface{}, error)

func (*Registry) Register added in v1.1.2

func (r *Registry) Register(name string, object interface{})

type Unmarshaler added in v1.1.0

type Unmarshaler = json.Unmarshaler

Jump to

Keyboard shortcuts

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