codec

package
v2.1.13 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnmarshalTo

func UnmarshalTo[T any](o Unmarshaler, a any) (t T, err error)

Types

type Compacter added in v2.0.15

type Compacter interface {
	Compact(src []byte) ([]byte, error)
	CompactString(src string) (string, error)

	MustCompact(src []byte) []byte
	MustCompactString(src string) string
}

type IndentMarshaler

type IndentMarshaler interface {
	MarshalIndent(v any) ([]byte, error)
	MarshalIndentString(v any) (string, error)

	MustMarshalIndent(v any) []byte
	MustMarshalIndentString(v any) string
}

type Indenter added in v2.0.15

type Indenter interface {
	Indent(src []byte) ([]byte, error)
	IndentString(src string) (string, error)

	MustIndent(src []byte) []byte
	MustIndentString(src string) string
}

type Marshaler

type Marshaler interface {
	Marshal(v any) ([]byte, error)
	MarshalString(v any) (string, error)

	MustMarshal(v any) []byte
	MustMarshalString(v any) string
}

type Unmarshaler

type Unmarshaler interface {
	Unmarshal(bs []byte, v any) error
	UnmarshalString(s string, v any) error

	MustUnmarshal(bs []byte, v any)
	MustUnmarshalString(s string, v any)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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