Documentation
¶
Index ¶
- Constants
- func AppendAnyValue(b []byte, v any) []byte
- func AppendFloat64(b []byte, f float64) []byte
- func AppendInvertedJSON(b []byte, v *fastjson.Value) []byte
- func AppendJSONValue(b []byte, v *fastjson.Value) []byte
- func AppendNumber[T constraints.Integer | constraints.Float](b []byte, n T) []byte
- func BytesToFloat64(b []byte) float64
- func DecodeToAny(b []byte) (v any, n int, err error)
- func DecodeToByte(b []byte) (v []byte, n int, err error)
- func DecodeToJSON(p *fastjson.Parser, a *fastjson.Arena, b []byte) (v *fastjson.Value, n int, err error)
- type Type
Constants ¶
View Source
const ( TypeNull = Type(1) TypeNumber = Type(2) TypeString = Type(3) TypeFalse = Type(4) TypeTrue = Type(5) TypeArray = Type(6) TypeObject = Type(7) )
View Source
const EOS = byte(0)
Variables ¶
This section is empty.
Functions ¶
func AppendAnyValue ¶
func AppendFloat64 ¶
AppendFloat64 encodes float64 as bytes that will be correctly comparable with byte.Compare
func AppendNumber ¶
func AppendNumber[T constraints.Integer | constraints.Float](b []byte, n T) []byte
func BytesToFloat64 ¶
BytesToFloat64 decodes float64 from bytes encoded with AppendFloat64
Types ¶
Click to show internal directories.
Click to hide internal directories.