Documentation
¶
Overview ¶
Package codec provides a model and conventions for marshaling and unmarshaling values to and from their encodings.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Codec ¶
type Codec interface {
NewDecoder(io.Reader, ...DecodeOption) Decoder
NewEncoder(io.Writer, ...EncodeOption) Encoder
Marshal(v any) ([]byte, error)
Unmarshal(data []byte, v any) error
}
func NewJSONCodec ¶
func NewJSONCodec() Codec
type DecodeOption ¶
type DecodeOption interface {
Apply(Decoder)
}
type EncodeOption ¶
type EncodeOption interface {
Apply(Encoder)
}
Click to show internal directories.
Click to hide internal directories.