json

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

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

func MarshalIndent

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

func Unmarshal

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

func Valid

func Valid(data []byte) bool

func Version

func Version() string

Types

type Decoder

type Decoder interface {
	Decode(v any) error
}

Decoder is the common interface implemented by the active streaming JSON decoder.

func NewDecoder

func NewDecoder(r io.Reader) Decoder

type Encoder

type Encoder interface {
	Encode(v any) error
}

Encoder is the common interface implemented by the active streaming JSON encoder.

func NewEncoder

func NewEncoder(w io.Writer) Encoder

type RawMessage

type RawMessage = jsontext.Value

Jump to

Keyboard shortcuts

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