encoding

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decoder

type Decoder interface {
	// Decode unmarshal the given byte slice into the given value.
	Decode([]byte, any) error
}

type Encoder

type Encoder interface {
	// Encode marshals the given value into a byte slice.
	Encode(any) ([]byte, error)
}

type EncoderDecoder

type EncoderDecoder interface {
	Encoder
	Decoder
}

type JSON

type JSON struct{}

func (JSON) Decode

func (JSON) Decode(data []byte, v any) error

func (JSON) Encode

func (JSON) Encode(v any) ([]byte, error)

Jump to

Keyboard shortcuts

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