Documentation ¶
Overview ¶
Package jsonencoder References encoding/json/tables.go
Index ¶
- type Encoder
- func (enc *Encoder) AppendArrayBegin()
- func (enc *Encoder) AppendArrayEnd()
- func (enc *Encoder) AppendLiteralBool(v bool, quote bool)
- func (enc *Encoder) AppendLiteralBytes(v []byte)
- func (enc *Encoder) AppendLiteralFloat32(v float32, quote bool)
- func (enc *Encoder) AppendLiteralFloat64(v float64, quote bool)
- func (enc *Encoder) AppendLiteralInt32(v int32, quote bool)
- func (enc *Encoder) AppendLiteralInt64(v int64, quote bool)
- func (enc *Encoder) AppendLiteralInterface(v interface{}) error
- func (enc *Encoder) AppendLiteralNULL()
- func (enc *Encoder) AppendLiteralString(v string)
- func (enc *Encoder) AppendLiteralUint32(v uint32, quote bool)
- func (enc *Encoder) AppendLiteralUint64(v uint64, quote bool)
- func (enc *Encoder) AppendMapKeyBool(v bool, quote bool)
- func (enc *Encoder) AppendMapKeyInt32(v int32, quote bool)
- func (enc *Encoder) AppendMapKeyInt64(v int64, quote bool)
- func (enc *Encoder) AppendMapKeyString(v string)
- func (enc *Encoder) AppendMapKeyUInt32(v uint32, quote bool)
- func (enc *Encoder) AppendMapKeyUInt64(v uint64, quote bool)
- func (enc *Encoder) AppendObjectBegin()
- func (enc *Encoder) AppendObjectEnd()
- func (enc *Encoder) AppendObjectKey(k string)
- func (enc *Encoder) AppendPointerBool(v *bool, quote bool)
- func (enc *Encoder) AppendPointerFloat32(v *float32, quote bool)
- func (enc *Encoder) AppendPointerFloat64(v *float64, quote bool)
- func (enc *Encoder) AppendPointerInt32(v *int32, quote bool)
- func (enc *Encoder) AppendPointerInt64(v *int64, quote bool)
- func (enc *Encoder) AppendPointerString(v *string)
- func (enc *Encoder) AppendPointerUint32(v *uint32, quote bool)
- func (enc *Encoder) AppendPointerUint64(v *uint64, quote bool)
- func (enc *Encoder) AppendWKTAnyByProto(v *any.Any) error
- func (enc *Encoder) Bytes() []byte
- func (enc *Encoder) Write(p []byte) (n int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
func (*Encoder) AppendArrayBegin ¶
func (enc *Encoder) AppendArrayBegin()
AppendArrayBegin can be used for begin of array and slice.
func (*Encoder) AppendArrayEnd ¶
func (enc *Encoder) AppendArrayEnd()
AppendArrayEnd can be used for end of array and slice.
func (*Encoder) AppendLiteralBool ¶
AppendLiteralBool can be used for value of literal, slice, array and map.
func (*Encoder) AppendLiteralBytes ¶
AppendLiteralBytes can be used for value of literal, slice, array and map.
func (*Encoder) AppendLiteralFloat32 ¶
AppendLiteralFloat32 can be used for value of literal, slice, array and map.
func (*Encoder) AppendLiteralFloat64 ¶
AppendLiteralFloat64 can be used for value of literal, slice, array and map.
func (*Encoder) AppendLiteralInt32 ¶
AppendLiteralInt32 can be used for value of literal, slice, array and map.
func (*Encoder) AppendLiteralInt64 ¶
AppendLiteralInt64 can be used for value of literal, slice, array and map.
func (*Encoder) AppendLiteralInterface ¶
AppendLiteralInterface can be used for value of literal, slice, array and map.
func (*Encoder) AppendLiteralNULL ¶
func (enc *Encoder) AppendLiteralNULL()
AppendLiteralNULL can be used for value of literal, slice, array and map.
func (*Encoder) AppendLiteralString ¶
AppendLiteralString can be used for value of literal, slice, array and map.
func (*Encoder) AppendLiteralUint32 ¶
AppendLiteralUint32 can be used for value of literal, slice, array and map.
func (*Encoder) AppendLiteralUint64 ¶
AppendLiteralUint64 can be used for value of literal, slice, array and map.
func (*Encoder) AppendMapKeyBool ¶
func (*Encoder) AppendMapKeyInt32 ¶
func (*Encoder) AppendMapKeyInt64 ¶
func (*Encoder) AppendMapKeyString ¶
func (*Encoder) AppendMapKeyUInt32 ¶
func (*Encoder) AppendMapKeyUInt64 ¶
func (*Encoder) AppendObjectBegin ¶
func (enc *Encoder) AppendObjectBegin()
AppendObjectBegin can be used for begin of JSON, map and struct.
func (*Encoder) AppendObjectEnd ¶
func (enc *Encoder) AppendObjectEnd()
AppendObjectEnd can be used for end of JSON, map and struct.
func (*Encoder) AppendObjectKey ¶
func (*Encoder) AppendPointerBool ¶
AppendPointerBool can be used for value of literal, slice, array and map.
func (*Encoder) AppendPointerFloat32 ¶
AppendPointerFloat32 can be used for value of literal, slice, array and map.
func (*Encoder) AppendPointerFloat64 ¶
AppendPointerFloat64 can be used for value of literal, slice, array and map.
func (*Encoder) AppendPointerInt32 ¶
AppendPointerInt32 can be used for value of literal, slice, array and map.
func (*Encoder) AppendPointerInt64 ¶
AppendPointerInt64 can be used for value of literal, slice, array and map.
func (*Encoder) AppendPointerString ¶
AppendPointerString can be used for value of literal, slice, array and map.
func (*Encoder) AppendPointerUint32 ¶
AppendPointerUint32 can be used for value of literal, slice, array and map.
func (*Encoder) AppendPointerUint64 ¶
AppendPointerUint64 can be used for value of literal, slice, array and map.