json

package
v0.0.0-...-2d343b4 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package json provides a json codec

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCodec

func NewCodec(c io.ReadWriteCloser) codec.Codec

Types

type Codec

type Codec struct {
	Conn io.ReadWriteCloser
}

func (*Codec) Close

func (c *Codec) Close() error

func (*Codec) Name

func (c *Codec) Name() string

func (*Codec) Read

func (c *Codec) Read(b interface{}) error

func (*Codec) Write

func (c *Codec) Write(b interface{}) error

type Marshaler

type Marshaler struct{}

func (Marshaler) Marshal

func (j Marshaler) Marshal(v interface{}) ([]byte, error)

func (Marshaler) Name

func (j Marshaler) Name() string

func (Marshaler) Unmarshal

func (j Marshaler) Unmarshal(d []byte, v interface{}) error

Jump to

Keyboard shortcuts

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