cjson

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2018 License: Apache-2.0 Imports: 13 Imported by: 14

Documentation

Index

Constants

View Source
const (
	TAG_VARINT = bindings.TAG_VARINT
	TAG_OBJECT = bindings.TAG_OBJECT
	TAG_END    = bindings.TAG_END
	TAG_ARRAY  = bindings.TAG_ARRAY
	TAG_BOOL   = bindings.TAG_BOOL
	TAG_STRING = bindings.TAG_STRING
	TAG_DOUBLE = bindings.TAG_DOUBLE
	TAG_NULL   = bindings.TAG_NULL
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Decoder

type Decoder struct {
	// contains filtered or unexported fields
}

func (*Decoder) Decode

func (dec *Decoder) Decode(cjson []byte, dest interface{}) (err error)

func (*Decoder) DecodeCPtr

func (dec *Decoder) DecodeCPtr(cptr uintptr, dest interface{}) (err error)

func (*Decoder) DecodeX

func (dec *Decoder) DecodeX(tuple []byte, dest interface{})

type Encoder

type Encoder struct {
	// contains filtered or unexported fields
}

func (*Encoder) Encode

func (enc *Encoder) Encode(src interface{}, rdser *Serializer) error

type Serializer

type Serializer struct {
	// contains filtered or unexported fields
}

func NewPoolSerializer

func NewPoolSerializer() *Serializer

func NewSerializer

func NewSerializer(buf []byte) Serializer

func (*Serializer) Append

func (s *Serializer) Append(s2 Serializer)

func (*Serializer) Bytes

func (s *Serializer) Bytes() []byte

func (*Serializer) Close

func (s *Serializer) Close()

func (*Serializer) Eof

func (s *Serializer) Eof() bool

func (*Serializer) GetBytes

func (s *Serializer) GetBytes() (v []byte)

func (*Serializer) GetDouble

func (s *Serializer) GetDouble() (v float64)

func (*Serializer) GetUInt32

func (s *Serializer) GetUInt32() (v uint32)

func (*Serializer) GetUInt64

func (s *Serializer) GetUInt64() (v uint64)

func (*Serializer) GetVBytes

func (s *Serializer) GetVBytes() (v []byte)

func (*Serializer) GetVString

func (s *Serializer) GetVString() (v string)

func (*Serializer) GetVarInt

func (s *Serializer) GetVarInt() int64

func (*Serializer) GetVarUInt

func (s *Serializer) GetVarUInt() uint64

func (*Serializer) Pos

func (s *Serializer) Pos() int

func (*Serializer) PutBytes

func (s *Serializer) PutBytes(v []byte) *Serializer

func (*Serializer) PutDouble

func (s *Serializer) PutDouble(v float64) *Serializer

func (*Serializer) PutUInt32

func (s *Serializer) PutUInt32(v uint32) *Serializer

func (*Serializer) PutVBytes

func (s *Serializer) PutVBytes(v []byte) *Serializer

func (*Serializer) PutVString

func (s *Serializer) PutVString(v string) *Serializer

func (*Serializer) PutVarCUInt

func (s *Serializer) PutVarCUInt(v int) *Serializer

func (*Serializer) PutVarInt

func (s *Serializer) PutVarInt(v int64)

func (*Serializer) PutVarUInt

func (s *Serializer) PutVarUInt(v uint64) *Serializer

func (*Serializer) Write

func (s *Serializer) Write(v []byte) (n int, err error)

func (*Serializer) WriteString

func (s *Serializer) WriteString(vx string) *Serializer

type State

type State struct {
	// contains filtered or unexported fields
}

func NewState

func NewState() *State

func (*State) NewDecoder

func (state *State) NewDecoder() Decoder

func (*State) NewEncoder

func (state *State) NewEncoder() Encoder

func (*State) PayloadTypeVersion

func (state *State) PayloadTypeVersion() int32

func (*State) ReadPayloadType

func (state *State) ReadPayloadType(s *Serializer)

Jump to

Keyboard shortcuts

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