codec

package
v0.0.0-...-75be81d Latest Latest
Warning

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

Go to latest
Published: Sep 11, 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 Codec

type Codec[From, To any] interface {
	Encode(From) (To, error)
	Decode(To) (From, error)
}

type Json

type Json[From any] struct{}

func JSON

func JSON[From any]() Json[From]

func (Json[From]) Decode

func (Json[From]) Decode(encoded []byte) (From, error)

func (Json[From]) Encode

func (Json[From]) Encode(value From) ([]byte, error)

Jump to

Keyboard shortcuts

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