json

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(dec Decoder, target any) error

func DecodeRead added in v0.0.5

func DecodeRead[T any](reader io.Reader, sample T) (T, error)

func Encode

func Encode(enc Encoder, value any) error

func Marshal

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

func MarshalPretty

func MarshalPretty(value any) ([]byte, error)

func MarshalWrite

func MarshalWrite(writer io.Writer, value any) error

func Unmarshal

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

func UnmarshalRead

func UnmarshalRead(reader io.Reader, target any) error

Types

type Decoder

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

func NewDecoder

func NewDecoder(reader io.Reader) Decoder

type Encoder

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

func NewEncoder

func NewEncoder(writer io.Writer) Encoder

func WithDeterministic

func WithDeterministic(enc Encoder) Encoder

func WithIndent

func WithIndent(enc Encoder, indent string) Encoder

func WithPrefix

func WithPrefix(enc Encoder, prefix string) Encoder

Jump to

Keyboard shortcuts

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