go-micro: github.com/micro/go-micro/codec/json Index | Files

package json

import "github.com/micro/go-micro/codec/json"

Package json provides a json codec

Index

Package Files

json.go marshaler.go

func NewCodec Uses

func NewCodec(c io.ReadWriteCloser) codec.Codec

type Codec Uses

type Codec struct {
    Conn    io.ReadWriteCloser
    Encoder *json.Encoder
    Decoder *json.Decoder
}

func (*Codec) Close Uses

func (c *Codec) Close() error

func (*Codec) ReadBody Uses

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

func (*Codec) ReadHeader Uses

func (c *Codec) ReadHeader(m *codec.Message, t codec.MessageType) error

func (*Codec) String Uses

func (c *Codec) String() string

func (*Codec) Write Uses

func (c *Codec) Write(m *codec.Message, b interface{}) error

type Marshaler Uses

type Marshaler struct{}

func (Marshaler) Marshal Uses

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

func (Marshaler) String Uses

func (j Marshaler) String() string

func (Marshaler) Unmarshal Uses

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

Package json imports 5 packages (graph) and is imported by 27 packages. Updated 2019-06-19. Refresh now. Tools for package owners.