serializer

package
v3.2.7 Latest Latest
Warning

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

Go to latest
Published: May 8, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSON

type JSON[T any] struct{}

func (JSON[T]) GetContentType

func (j JSON[T]) GetContentType() string

func (JSON[T]) Marshal

func (j JSON[T]) Marshal(v T) ([]byte, error)

func (JSON[T]) Unmarshal

func (j JSON[T]) Unmarshal(data []byte) (T, error)

type Serializer

type Serializer[T any] interface {
	Marshal(T) ([]byte, error)
	Unmarshal([]byte) (T, error)
	GetContentType() string
}

Jump to

Keyboard shortcuts

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