json

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bytes added in v0.9.0

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

func Decode

func Decode(dec Decoder, target any) error

func Encode

func Encode(enc Encoder, value any) error

func Parse added in v0.1.12

func Parse[T any](data []byte) (T, error)

func ParseInto added in v0.9.0

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

func ParseString added in v0.1.12

func ParseString[T any](data string) (T, error)

func ParseStringInto added in v0.9.0

func ParseStringInto(data string, target any) error

func Pretty added in v0.9.0

func Pretty(s string) string

func PrettyBytes added in v0.9.0

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

func Read added in v0.9.0

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

func ReadInto added in v0.9.0

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

func Write added in v0.9.0

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

func WriteOutput

func WriteOutput(v 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 WithIndent

func WithIndent(enc Encoder, indent string) Encoder

func WithPrefix

func WithPrefix(enc Encoder, prefix string) Encoder

type Number added in v0.9.0

type Number = json.Number

Jump to

Keyboard shortcuts

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