json

package
v0.0.0-...-dd0d759 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(v any) ([]byte, error)

Marshal returns the JSON encoding of v.

func MarshalIndent

func MarshalIndent(v any, prefix, indent string) ([]byte, error)

MarshalIndent is like Marshal but applies Indent to format the output.

func NewDecoder

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

NewDecoder returns a new JSON decoder.

func NewEncoder

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

NewEncoder returns a new JSON encoder.

func Unmarshal

func Unmarshal(data []byte, v any) error

Unmarshal parses the JSON-encoded data and stores the result in the value pointed to by v.

Types

type RawMessage

type RawMessage jsonstd.RawMessage

RawMessage is a raw encoded JSON value.

func (*RawMessage) MarshalJSON

func (m *RawMessage) MarshalJSON() ([]byte, error)

MarshalJSON returns m as the JSON encoding of m.

func (*RawMessage) UnmarshalJSON

func (m *RawMessage) UnmarshalJSON(data []byte) error

UnmarshalJSON sets *m to a copy of data.

type SyntaxError

type SyntaxError = jsonstd.SyntaxError

Jump to

Keyboard shortcuts

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