Documentation ¶
Index ¶
- func StringToBytes(str string) []byte
- type Encoder
- func (enc *Encoder) AddFloat(v float64)
- func (enc *Encoder) AddFloat32(v float32)
- func (enc *Encoder) AddFloat32Key(key string, v float32)
- func (enc *Encoder) AddFloat32KeyNullEmpty(key string, v float32)
- func (enc *Encoder) AddFloat32KeyOmitEmpty(key string, v float32)
- func (enc *Encoder) AddFloat32NullEmpty(v float32)
- func (enc *Encoder) AddFloat32OmitEmpty(v float32)
- func (enc *Encoder) AddFloat64(v float64)
- func (enc *Encoder) AddFloat64Key(key string, v float64)
- func (enc *Encoder) AddFloat64KeyOmitEmpty(key string, v float64)
- func (enc *Encoder) AddFloat64OmitEmpty(v float64)
- func (enc *Encoder) AddFloatKey(key string, v float64)
- func (enc *Encoder) AddFloatKeyNullEmpty(key string, v float64)
- func (enc *Encoder) AddFloatKeyOmitEmpty(key string, v float64)
- func (enc *Encoder) AddFloatNullEmpty(v float64)
- func (enc *Encoder) AddFloatOmitEmpty(v float64)
- func (enc *Encoder) AddInt(v int)
- func (enc *Encoder) AddInt16(v int16)
- func (enc *Encoder) AddInt16Key(key string, v int16)
- func (enc *Encoder) AddInt16KeyNullEmpty(key string, v int16)
- func (enc *Encoder) AddInt16KeyOmitEmpty(key string, v int16)
- func (enc *Encoder) AddInt16OmitEmpty(v int16)
- func (enc *Encoder) AddInt32(v int32)
- func (enc *Encoder) AddInt32Key(key string, v int32)
- func (enc *Encoder) AddInt32KeyOmitEmpty(key string, v int32)
- func (enc *Encoder) AddInt32NullEmpty(v int32)
- func (enc *Encoder) AddInt32OmitEmpty(v int32)
- func (enc *Encoder) AddInt64(v int64)
- func (enc *Encoder) AddInt64Key(key string, v int64)
- func (enc *Encoder) AddInt64KeyNullEmpty(key string, v int64)
- func (enc *Encoder) AddInt64KeyOmitEmpty(key string, v int64)
- func (enc *Encoder) AddInt64NullEmpty(v int64)
- func (enc *Encoder) AddInt64OmitEmpty(v int64)
- func (enc *Encoder) AddInt8(v int8)
- func (enc *Encoder) AddInt8Key(key string, v int8)
- func (enc *Encoder) AddInt8KeyNullEmpty(key string, v int8)
- func (enc *Encoder) AddInt8KeyOmitEmpty(key string, v int8)
- func (enc *Encoder) AddInt8NullEmpty(v int8)
- func (enc *Encoder) AddInt8OmitEmpty(v int8)
- func (enc *Encoder) AddIntKey(key string, v int)
- func (enc *Encoder) AddIntKeyNullEmpty(key string, v int)
- func (enc *Encoder) AddIntKeyOmitEmpty(key string, v int)
- func (enc *Encoder) AddIntNullEmpty(v int)
- func (enc *Encoder) AddIntOmitEmpty(v int)
- func (enc *Encoder) AddUint16(v uint16)
- func (enc *Encoder) AddUint16Key(key string, v uint16)
- func (enc *Encoder) AddUint16KeyNullEmpty(key string, v uint16)
- func (enc *Encoder) AddUint16KeyOmitEmpty(key string, v uint16)
- func (enc *Encoder) AddUint16NullEmpty(v uint16)
- func (enc *Encoder) AddUint16OmitEmpty(v uint16)
- func (enc *Encoder) AddUint32(v uint32)
- func (enc *Encoder) AddUint32Key(key string, v uint32)
- func (enc *Encoder) AddUint32KeyNullEmpty(key string, v uint32)
- func (enc *Encoder) AddUint32KeyOmitEmpty(key string, v uint32)
- func (enc *Encoder) AddUint32NullEmpty(v uint32)
- func (enc *Encoder) AddUint32OmitEmpty(v uint32)
- func (enc *Encoder) AddUint64(v uint64)
- func (enc *Encoder) AddUint64Key(key string, v uint64)
- func (enc *Encoder) AddUint64KeyNullEmpty(key string, v uint64)
- func (enc *Encoder) AddUint64KeyOmitEmpty(key string, v uint64)
- func (enc *Encoder) AddUint64NullEmpty(v uint64)
- func (enc *Encoder) AddUint64OmitEmpty(v uint64)
- func (enc *Encoder) AddUint8(v uint8)
- func (enc *Encoder) AddUint8Key(key string, v uint8)
- func (enc *Encoder) AddUint8KeyNullEmpty(key string, v uint8)
- func (enc *Encoder) AddUint8KeyOmitEmpty(key string, v uint8)
- func (enc *Encoder) AddUint8NullEmpty(v uint8)
- func (enc *Encoder) AddUint8OmitEmpty(v uint8)
- func (enc *Encoder) AppendByte(b byte)
- func (enc *Encoder) AppendBytes(b []byte)
- func (enc *Encoder) Buf() []byte
- func (enc *Encoder) Encode(v interface{}) error
- func (enc *Encoder) EncodeFloat(n float64) error
- func (enc *Encoder) EncodeFloat32(n float32) error
- func (enc *Encoder) EncodeInt(n int) error
- func (enc *Encoder) EncodeInt64(n int64) error
- func (enc *Encoder) EncodeUint64(n uint64) error
- func (enc *Encoder) Float(v float64)
- func (enc *Encoder) Float32(v float32)
- func (enc *Encoder) Float32Key(key string, v float32)
- func (enc *Encoder) Float32KeyNullEmpty(key string, v float32)
- func (enc *Encoder) Float32KeyOmitEmpty(key string, v float32)
- func (enc *Encoder) Float32NullEmpty(v float32)
- func (enc *Encoder) Float32OmitEmpty(v float32)
- func (enc *Encoder) Float64(v float64)
- func (enc *Encoder) Float64Key(key string, value float64)
- func (enc *Encoder) Float64KeyNullEmpty(key string, v float64)
- func (enc *Encoder) Float64KeyOmitEmpty(key string, v float64)
- func (enc *Encoder) Float64NullEmpty(v float64)
- func (enc *Encoder) Float64OmitEmpty(v float64)
- func (enc *Encoder) FloatKey(key string, v float64)
- func (enc *Encoder) FloatKeyNullEmpty(key string, v float64)
- func (enc *Encoder) FloatKeyOmitEmpty(key string, v float64)
- func (enc *Encoder) FloatNullEmpty(v float64)
- func (enc *Encoder) FloatOmitEmpty(v float64)
- func (enc *Encoder) Int(v int)
- func (enc *Encoder) Int16(v int16)
- func (enc *Encoder) Int16Key(key string, v int16)
- func (enc *Encoder) Int16KeyNullEmpty(key string, v int16)
- func (enc *Encoder) Int16KeyOmitEmpty(key string, v int16)
- func (enc *Encoder) Int16NullEmpty(v int16)
- func (enc *Encoder) Int16OmitEmpty(v int16)
- func (enc *Encoder) Int32(v int32)
- func (enc *Encoder) Int32Key(key string, v int32)
- func (enc *Encoder) Int32KeyNullEmpty(key string, v int32)
- func (enc *Encoder) Int32KeyOmitEmpty(key string, v int32)
- func (enc *Encoder) Int32NullEmpty(v int32)
- func (enc *Encoder) Int32OmitEmpty(v int32)
- func (enc *Encoder) Int64(v int64)
- func (enc *Encoder) Int64Key(key string, v int64)
- func (enc *Encoder) Int64KeyNullEmpty(key string, v int64)
- func (enc *Encoder) Int64KeyOmitEmpty(key string, v int64)
- func (enc *Encoder) Int64NullEmpty(v int64)
- func (enc *Encoder) Int64OmitEmpty(v int64)
- func (enc *Encoder) Int8(v int8)
- func (enc *Encoder) Int8Key(key string, v int8)
- func (enc *Encoder) Int8KeyNullEmpty(key string, v int8)
- func (enc *Encoder) Int8KeyOmitEmpty(key string, v int8)
- func (enc *Encoder) Int8NullEmpty(v int8)
- func (enc *Encoder) Int8OmitEmpty(v int8)
- func (enc *Encoder) IntKey(key string, v int)
- func (enc *Encoder) IntKeyNullEmpty(key string, v int)
- func (enc *Encoder) IntKeyOmitEmpty(key string, v int)
- func (enc *Encoder) IntNullEmpty(v int)
- func (enc *Encoder) IntOmitEmpty(v int)
- func (enc *Encoder) Uint16(v uint16)
- func (enc *Encoder) Uint16Key(key string, v uint16)
- func (enc *Encoder) Uint16KeyNullEmpty(key string, v uint16)
- func (enc *Encoder) Uint16KeyOmitEmpty(key string, v uint16)
- func (enc *Encoder) Uint16NullEmpty(v uint16)
- func (enc *Encoder) Uint16OmitEmpty(v uint16)
- func (enc *Encoder) Uint32(v uint32)
- func (enc *Encoder) Uint32Key(key string, v uint32)
- func (enc *Encoder) Uint32KeyNullEmpty(key string, v uint32)
- func (enc *Encoder) Uint32KeyOmitEmpty(key string, v uint32)
- func (enc *Encoder) Uint32NullEmpty(v uint32)
- func (enc *Encoder) Uint32OmitEmpty(v uint32)
- func (enc *Encoder) Uint64(v uint64)
- func (enc *Encoder) Uint64Key(key string, v uint64)
- func (enc *Encoder) Uint64KeyNullEmpty(key string, v uint64)
- func (enc *Encoder) Uint64KeyOmitEmpty(key string, v uint64)
- func (enc *Encoder) Uint64NullEmpty(v uint64)
- func (enc *Encoder) Uint64OmitEmpty(v uint64)
- func (enc *Encoder) Uint8(v uint8)
- func (enc *Encoder) Uint8Key(key string, v uint8)
- func (enc *Encoder) Uint8KeyNullEmpty(key string, v uint8)
- func (enc *Encoder) Uint8KeyOmitEmpty(key string, v uint8)
- func (enc *Encoder) Uint8NullEmpty(v uint8)
- func (enc *Encoder) Uint8OmitEmpty(v uint8)
- func (enc *Encoder) Write() (int, error)
- type InvalidMarshalError
- type InvalidUsagePooledEncoderError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StringToBytes ¶
Types ¶
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
An Encoder writes JSON values to an output stream.
func (*Encoder) AddFloat ¶
AddFloat adds a float64 to be encoded, must be used inside a slice or array encoding (does not encode a key)
func (*Encoder) AddFloat32 ¶
AddFloat32 adds a float32 to be encoded, must be used inside a slice or array encoding (does not encode a key)
func (*Encoder) AddFloat32Key ¶
AddFloat32Key adds a float32 to be encoded, must be used inside an object as it will encode a key
func (*Encoder) AddFloat32KeyNullEmpty ¶
AddFloat32KeyNullEmpty adds a float64 to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key
func (*Encoder) AddFloat32KeyOmitEmpty ¶
AddFloat32KeyOmitEmpty adds a float64 to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key
func (*Encoder) AddFloat32NullEmpty ¶
AddFloat32NullEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) AddFloat32OmitEmpty ¶
AddFloat32OmitEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) AddFloat64 ¶
AddFloat64 adds a float64 to be encoded, must be used inside a slice or array encoding (does not encode a key)
func (*Encoder) AddFloat64Key ¶
AddFloat64Key adds a float64 to be encoded, must be used inside an object as it will encode a key
func (*Encoder) AddFloat64KeyOmitEmpty ¶
AddFloat64KeyOmitEmpty adds a float64 to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key
func (*Encoder) AddFloat64OmitEmpty ¶
AddFloat64OmitEmpty adds a float64 to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) AddFloatKey ¶
AddFloatKey adds a float64 to be encoded, must be used inside an object as it will encode a key
func (*Encoder) AddFloatKeyNullEmpty ¶
AddFloatKeyNullEmpty adds a float64 to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key
func (*Encoder) AddFloatKeyOmitEmpty ¶
AddFloatKeyOmitEmpty adds a float64 to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key
func (*Encoder) AddFloatNullEmpty ¶
AddFloatNullEmpty adds a float64 to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) AddFloatOmitEmpty ¶
AddFloatOmitEmpty adds a float64 to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) AddInt ¶
AddInt adds an int to be encoded, must be used inside a slice or array encoding (does not encode a key)
func (*Encoder) AddInt16 ¶
AddInt16 adds an int to be encoded, must be used inside a slice or array encoding (does not encode a key)
func (*Encoder) AddInt16Key ¶
AddInt16Key adds an int16 to be encoded, must be used inside an object as it will encode a key
func (*Encoder) AddInt16KeyNullEmpty ¶
AddInt16KeyNullEmpty adds an int16 to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key.
func (*Encoder) AddInt16KeyOmitEmpty ¶
AddInt16KeyOmitEmpty adds an int16 to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key.
func (*Encoder) AddInt16OmitEmpty ¶
AddInt16OmitEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) AddInt32 ¶
AddInt32 adds an int to be encoded, must be used inside a slice or array encoding (does not encode a key)
func (*Encoder) AddInt32Key ¶
AddInt32Key adds an int32 to be encoded, must be used inside an object as it will encode a key
func (*Encoder) AddInt32KeyOmitEmpty ¶
AddInt32KeyOmitEmpty adds an int32 to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key.
func (*Encoder) AddInt32NullEmpty ¶
AddInt32NullEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) AddInt32OmitEmpty ¶
AddInt32OmitEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) AddInt64 ¶
AddInt64 adds an int to be encoded, must be used inside a slice or array encoding (does not encode a key)
func (*Encoder) AddInt64Key ¶
AddInt64Key adds an int64 to be encoded, must be used inside an object as it will encode a key
func (*Encoder) AddInt64KeyNullEmpty ¶
AddInt64KeyNullEmpty adds an int64 to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key.
func (*Encoder) AddInt64KeyOmitEmpty ¶
AddInt64KeyOmitEmpty adds an int64 to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key.
func (*Encoder) AddInt64NullEmpty ¶
AddInt64NullEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) AddInt64OmitEmpty ¶
AddInt64OmitEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) AddInt8 ¶
AddInt8 adds an int to be encoded, must be used inside a slice or array encoding (does not encode a key)
func (*Encoder) AddInt8Key ¶
AddInt8Key adds an int8 to be encoded, must be used inside an object as it will encode a key
func (*Encoder) AddInt8KeyNullEmpty ¶
AddInt8KeyNullEmpty adds an int8 to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key.
func (*Encoder) AddInt8KeyOmitEmpty ¶
AddInt8KeyOmitEmpty adds an int8 to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key.
func (*Encoder) AddInt8NullEmpty ¶
AddInt8NullEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) AddInt8OmitEmpty ¶
AddInt8OmitEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) AddIntKey ¶
AddIntKey adds an int to be encoded, must be used inside an object as it will encode a key
func (*Encoder) AddIntKeyNullEmpty ¶
AddIntKeyNullEmpty adds an int to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key.
func (*Encoder) AddIntKeyOmitEmpty ¶
AddIntKeyOmitEmpty adds an int to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key.
func (*Encoder) AddIntNullEmpty ¶
AddIntNullEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) AddIntOmitEmpty ¶
AddIntOmitEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) AddUint16 ¶
AddUint16 adds an int to be encoded, must be used inside a slice or array encoding (does not encode a key)
func (*Encoder) AddUint16Key ¶
AddUint16Key adds an int to be encoded, must be used inside an object as it will encode a key
func (*Encoder) AddUint16KeyNullEmpty ¶
AddUint16KeyNullEmpty adds an int to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key.
func (*Encoder) AddUint16KeyOmitEmpty ¶
AddUint16KeyOmitEmpty adds an int to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key.
func (*Encoder) AddUint16NullEmpty ¶
AddUint16NullEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) AddUint16OmitEmpty ¶
AddUint16OmitEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) AddUint32 ¶
AddUint32 adds an int to be encoded, must be used inside a slice or array encoding (does not encode a key)
func (*Encoder) AddUint32Key ¶
AddUint32Key adds an int to be encoded, must be used inside an object as it will encode a key
func (*Encoder) AddUint32KeyNullEmpty ¶
AddUint32KeyNullEmpty adds an int to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key.
func (*Encoder) AddUint32KeyOmitEmpty ¶
AddUint32KeyOmitEmpty adds an int to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key.
func (*Encoder) AddUint32NullEmpty ¶
AddUint32NullEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) AddUint32OmitEmpty ¶
AddUint32OmitEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) AddUint64 ¶
AddUint64 adds an int to be encoded, must be used inside a slice or array encoding (does not encode a key)
func (*Encoder) AddUint64Key ¶
AddUint64Key adds an int to be encoded, must be used inside an object as it will encode a key
func (*Encoder) AddUint64KeyNullEmpty ¶
AddUint64KeyNullEmpty adds an int to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key.
func (*Encoder) AddUint64KeyOmitEmpty ¶
AddUint64KeyOmitEmpty adds an int to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key.
func (*Encoder) AddUint64NullEmpty ¶
AddUint64NullEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) AddUint64OmitEmpty ¶
AddUint64OmitEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) AddUint8 ¶
AddUint8 adds an int to be encoded, must be used inside a slice or array encoding (does not encode a key)
func (*Encoder) AddUint8Key ¶
AddUint8Key adds an int to be encoded, must be used inside an object as it will encode a key
func (*Encoder) AddUint8KeyNullEmpty ¶
AddUint8KeyNullEmpty adds an int to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key.
func (*Encoder) AddUint8KeyOmitEmpty ¶
AddUint8KeyOmitEmpty adds an int to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key.
func (*Encoder) AddUint8NullEmpty ¶
AddUint8NullEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) AddUint8OmitEmpty ¶
AddUint8OmitEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) AppendByte ¶
AppendByte allows a modular usage by appending a single byte manually to the current state of the buffer.
func (*Encoder) AppendBytes ¶
AppendBytes allows a modular usage by appending bytes manually to the current state of the buffer.
func (*Encoder) Encode ¶
Encode encodes a value to JSON.
If Encode cannot find a way to encode the type to JSON it will return an InvalidMarshalError.
func (*Encoder) EncodeFloat ¶
EncodeFloat encodes a float64 to JSON
func (*Encoder) EncodeFloat32 ¶
EncodeFloat32 encodes a float32 to JSON
func (*Encoder) EncodeInt64 ¶
EncodeInt64 encodes an int64 to JSON
func (*Encoder) EncodeUint64 ¶
EncodeUint64 encodes an int64 to JSON
func (*Encoder) Float ¶
Float adds a float64 to be encoded, must be used inside a slice or array encoding (does not encode a key)
func (*Encoder) Float32 ¶
Float32 adds a float32 to be encoded, must be used inside a slice or array encoding (does not encode a key)
func (*Encoder) Float32Key ¶
Float32Key adds a float32 to be encoded, must be used inside an object as it will encode a key
func (*Encoder) Float32KeyNullEmpty ¶
Float32KeyNullEmpty adds a float64 to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key
func (*Encoder) Float32KeyOmitEmpty ¶
Float32KeyOmitEmpty adds a float64 to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key
func (*Encoder) Float32NullEmpty ¶
Float32NullEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) Float32OmitEmpty ¶
Float32OmitEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) Float64 ¶
Float64 adds a float64 to be encoded, must be used inside a slice or array encoding (does not encode a key)
func (*Encoder) Float64Key ¶
Float64Key adds a float64 to be encoded, must be used inside an object as it will encode a key
func (*Encoder) Float64KeyNullEmpty ¶
Float64KeyNullEmpty adds a float64 to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) Float64KeyOmitEmpty ¶
Float64KeyOmitEmpty adds a float64 to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key
func (*Encoder) Float64NullEmpty ¶
Float64NullEmpty adds a float64 to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) Float64OmitEmpty ¶
Float64OmitEmpty adds a float64 to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) FloatKey ¶
FloatKey adds a float64 to be encoded, must be used inside an object as it will encode a key
func (*Encoder) FloatKeyNullEmpty ¶
FloatKeyNullEmpty adds a float64 to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key
func (*Encoder) FloatKeyOmitEmpty ¶
FloatKeyOmitEmpty adds a float64 to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key
func (*Encoder) FloatNullEmpty ¶
FloatNullEmpty adds a float64 to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) FloatOmitEmpty ¶
FloatOmitEmpty adds a float64 to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) Int ¶
Int adds an int to be encoded, must be used inside a slice or array encoding (does not encode a key)
func (*Encoder) Int16 ¶
Int16 adds an int to be encoded, must be used inside a slice or array encoding (does not encode a key)
func (*Encoder) Int16Key ¶
Int16Key adds an int16 to be encoded, must be used inside an object as it will encode a key
func (*Encoder) Int16KeyNullEmpty ¶
Int16KeyNullEmpty adds an int16 to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key.
func (*Encoder) Int16KeyOmitEmpty ¶
Int16KeyOmitEmpty adds an int16 to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key.
func (*Encoder) Int16NullEmpty ¶
Int16NullEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) Int16OmitEmpty ¶
Int16OmitEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) Int32 ¶
Int32 adds an int to be encoded, must be used inside a slice or array encoding (does not encode a key)
func (*Encoder) Int32Key ¶
Int32Key adds an int32 to be encoded, must be used inside an object as it will encode a key
func (*Encoder) Int32KeyNullEmpty ¶
Int32KeyNullEmpty adds an int32 to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key.
func (*Encoder) Int32KeyOmitEmpty ¶
Int32KeyOmitEmpty adds an int32 to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key.
func (*Encoder) Int32NullEmpty ¶
Int32NullEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) Int32OmitEmpty ¶
Int32OmitEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) Int64 ¶
Int64 adds an int to be encoded, must be used inside a slice or array encoding (does not encode a key)
func (*Encoder) Int64Key ¶
Int64Key adds an int64 to be encoded, must be used inside an object as it will encode a key
func (*Encoder) Int64KeyNullEmpty ¶
Int64KeyNullEmpty adds an int64 to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key.
func (*Encoder) Int64KeyOmitEmpty ¶
Int64KeyOmitEmpty adds an int64 to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key.
func (*Encoder) Int64NullEmpty ¶
Int64NullEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) Int64OmitEmpty ¶
Int64OmitEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) Int8 ¶
Int8 adds an int to be encoded, must be used inside a slice or array encoding (does not encode a key)
func (*Encoder) Int8Key ¶
Int8Key adds an int8 to be encoded, must be used inside an object as it will encode a key
func (*Encoder) Int8KeyNullEmpty ¶
Int8KeyNullEmpty adds an int8 to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key.
func (*Encoder) Int8KeyOmitEmpty ¶
Int8KeyOmitEmpty adds an int8 to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key.
func (*Encoder) Int8NullEmpty ¶
Int8NullEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) Int8OmitEmpty ¶
Int8OmitEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) IntKey ¶
IntKey adds an int to be encoded, must be used inside an object as it will encode a key
func (*Encoder) IntKeyNullEmpty ¶
IntKeyNullEmpty adds an int to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key.
func (*Encoder) IntKeyOmitEmpty ¶
IntKeyOmitEmpty adds an int to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key.
func (*Encoder) IntNullEmpty ¶
IntNullEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) IntOmitEmpty ¶
IntOmitEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) Uint16 ¶
Uint16 adds an int to be encoded, must be used inside a slice or array encoding (does not encode a key)
func (*Encoder) Uint16Key ¶
Uint16Key adds an int to be encoded, must be used inside an object as it will encode a key
func (*Encoder) Uint16KeyNullEmpty ¶
Uint16KeyNullEmpty adds an int to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key.
func (*Encoder) Uint16KeyOmitEmpty ¶
Uint16KeyOmitEmpty adds an int to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key.
func (*Encoder) Uint16NullEmpty ¶
Uint16NullEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) Uint16OmitEmpty ¶
Uint16OmitEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) Uint32 ¶
Uint32 adds an int to be encoded, must be used inside a slice or array encoding (does not encode a key)
func (*Encoder) Uint32Key ¶
Uint32Key adds an int to be encoded, must be used inside an object as it will encode a key
func (*Encoder) Uint32KeyNullEmpty ¶
Uint32KeyNullEmpty adds an int to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key.
func (*Encoder) Uint32KeyOmitEmpty ¶
Uint32KeyOmitEmpty adds an int to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key.
func (*Encoder) Uint32NullEmpty ¶
Uint32NullEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) Uint32OmitEmpty ¶
Uint32OmitEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) Uint64 ¶
Uint64 adds an int to be encoded, must be used inside a slice or array encoding (does not encode a key)
func (*Encoder) Uint64Key ¶
Uint64Key adds an int to be encoded, must be used inside an object as it will encode a key
func (*Encoder) Uint64KeyNullEmpty ¶
Uint64KeyNullEmpty adds an int to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key.
func (*Encoder) Uint64KeyOmitEmpty ¶
Uint64KeyOmitEmpty adds an int to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key.
func (*Encoder) Uint64NullEmpty ¶
Uint64NullEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) Uint64OmitEmpty ¶
Uint64OmitEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) Uint8 ¶
Uint8 adds an int to be encoded, must be used inside a slice or array encoding (does not encode a key)
func (*Encoder) Uint8Key ¶
Uint8Key adds an int to be encoded, must be used inside an object as it will encode a key
func (*Encoder) Uint8KeyNullEmpty ¶
Uint8KeyNullEmpty adds an int to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key.
func (*Encoder) Uint8KeyOmitEmpty ¶
Uint8KeyOmitEmpty adds an int to be encoded and skips it if its value is 0. Must be used inside an object as it will encode a key.
func (*Encoder) Uint8NullEmpty ¶
Uint8NullEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
func (*Encoder) Uint8OmitEmpty ¶
Uint8OmitEmpty adds an int to be encoded and skips it if its value is 0, must be used inside a slice or array encoding (does not encode a key).
type InvalidMarshalError ¶
type InvalidMarshalError string
func (InvalidMarshalError) Error ¶
func (err InvalidMarshalError) Error() string
type InvalidUsagePooledEncoderError ¶
type InvalidUsagePooledEncoderError string
InvalidUsagePooledEncoderError is a type representing an error returned when decoding is called on a still pooled Encoder
func (InvalidUsagePooledEncoderError) Error ¶
func (err InvalidUsagePooledEncoderError) Error() string