Help us shape the future of Go! Take the 2026 Go Developer Survey

json

package module
v3.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2021 License: Apache-2.0 Imports: 8 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(conn io.ReadWriteCloser) codec.Codec

Types

type Codec

type Codec struct {
	Conn       io.ReadWriteCloser
	StdDecoder *stdjson.Decoder
	SegEncoder *segjson.Encoder
	SegDecoder *segjson.Decoder
}

func (*Codec) Close

func (c *Codec) Close() error

func (*Codec) ReadBody

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

func (*Codec) ReadHeader

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

func (*Codec) String

func (c *Codec) String() string

func (*Codec) Write

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

type Marshaler

type Marshaler struct{}

func (Marshaler) Marshal

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

func (Marshaler) String

func (j Marshaler) String() 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