serializer

package module
v0.0.0-...-a2f1ae6 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2021 License: MIT Imports: 3 Imported by: 0

README

serializer

Just a tiny Go package for serializing to MessagePack or JSON using the same interface.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONSerializer

type JSONSerializer struct {
	Prefix, Indent string
}

func (JSONSerializer) Decode

func (JSONSerializer) Decode(r io.Reader, v interface{}) error

func (JSONSerializer) Encode

func (j JSONSerializer) Encode(w io.Writer, v interface{}) error

type MsgPSerializer

type MsgPSerializer struct{}

func (MsgPSerializer) Decode

func (MsgPSerializer) Decode(r io.Reader, v interface{}) error

func (MsgPSerializer) Encode

func (MsgPSerializer) Encode(w io.Writer, v interface{}) error

type Serializer

type Serializer interface {
	Decode(r io.Reader, v interface{}) error
	Encode(w io.Writer, v interface{}) error
}

Jump to

Keyboard shortcuts

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