json

package
v11.8.3 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

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

func MarshalToBuffer

func MarshalToBuffer(i interface{}) ([]byte, error)

func ProtoMarshalAppend added in v11.7.0

func ProtoMarshalAppend(buf []byte, i proto.Message) ([]byte, error)

func ProtoMarshalAppendOpts added in v11.7.0

func ProtoMarshalAppendOpts(buf []byte, i proto.Message, opts protojson.MarshalOptions) ([]byte, error)

func ProtoUnmarshal added in v11.7.0

func ProtoUnmarshal(b []byte, m proto.Message) error

func ProtoUnmarshalFromReader added in v11.7.0

func ProtoUnmarshalFromReader(r io.Reader, m proto.Message) error

func ProtoUnmarshalFromReaderOpts added in v11.7.0

func ProtoUnmarshalFromReaderOpts(r io.Reader, m proto.Message, opts protojson.UnmarshalOptions) error

func ProtoUnmarshalOpts added in v11.7.0

func ProtoUnmarshalOpts(b []byte, m proto.Message, opts protojson.UnmarshalOptions) error

func Unmarshal

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

func UnmarshalFromReader

func UnmarshalFromReader(r io.Reader, i interface{}) error

Types

type Marshaler

type Marshaler interface {
	MarshalJSON() ([]byte, error)
}

type Number added in v11.2.0

type Number = json.Number

type RawMessage

type RawMessage = json.RawMessage

type Unmarshaler

type Unmarshaler interface {
	UnmarshalJSON([]byte) error
}

Jump to

Keyboard shortcuts

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