Versions in this module Expand all Collapse all v0 v0.7.0 Dec 8, 2023 Changes in this version + type Decoder struct + func (d *Decoder) Break(b []byte, st, depth int) (i int, err error) + func (d *Decoder) DecodeString(b []byte, st int, buf []byte) (s []byte, i int, err error) + func (d *Decoder) DecodedStringLength(b []byte, st int) (n, i int, err error) + func (d *Decoder) Enter(b []byte, st int, typ byte) (i int, err error) + func (d *Decoder) ForMore(b []byte, i *int, typ byte, errp *error) bool + func (d *Decoder) Key(b []byte, st int) (k []byte, i int, err error) + func (d *Decoder) Length(b []byte, st int) (n, i int, err error) + func (d *Decoder) More(b []byte, st int, typ byte) (more bool, i int, err error) + func (d *Decoder) Raw(b []byte, st int) (v []byte, i int, err error) + func (d *Decoder) Skip(b []byte, st int) (i int, err error) + func (d *Decoder) SkipSpaces(b []byte, i int) int + func (d *Decoder) Type(b []byte, st int) (tp byte, i int, err error) + type Encoder struct + func (e *Encoder) EncodeString(w, s []byte) []byte + func (e *Encoder) EncodeStringContent(w, s []byte) []byte v0.6.0 Nov 12, 2023 Changes in this version + const None + var ErrBadNumber = errors.New("bad number") + var ErrBadRune = errors.New("bad rune") + var ErrBadString = errors.New("bad string") + var ErrEndOfBuffer = errors.New("unexpected end of buffer") + var ErrSyntax = errors.New("syntax error") + var ErrType = errors.New("incompatible type") + func SkipSpaces(b []byte, i int) int + type Generator struct + func (g *Generator) EncodeString(w, s []byte) []byte + func (g *Generator) EncodeStringContent(w, s []byte) []byte + type Parser struct + func (p *Parser) Break(b []byte, st, depth int) (i int, err error) + func (p *Parser) DecodeString(b []byte, st int, buf []byte) (s []byte, i int, err error) + func (p *Parser) DecodedStringLength(b []byte, st int) (n, i int, err error) + func (p *Parser) Enter(b []byte, st int, typ byte) (i int, err error) + func (p *Parser) ForMore(b []byte, i *int, typ byte, errp *error) bool + func (p *Parser) Key(b []byte, st int) (k []byte, i int, err error) + func (p *Parser) Length(b []byte, st int) (n, i int, err error) + func (p *Parser) More(b []byte, st int, typ byte) (more bool, i int, err error) + func (p *Parser) Raw(b []byte, st int) (v []byte, i int, err error) + func (p *Parser) Skip(b []byte, st int) (i int, err error) + func (p *Parser) SkipSpaces(b []byte, i int) int + func (p *Parser) Type(b []byte, st int) (tp byte, i int, err error) v0.1.0 Oct 14, 2018 Changes in this version + var ErrConversion = errors.New("type conversion") + var ErrExpectedValue = errors.New("expected value") + var ErrNoSuchKey = errors.New("no such key") + var ErrOutOfRange = errors.New("out of range") + var ErrOverflow = errors.New("type overflow") + var ErrUnexpectedChar = errors.New("unexpected char") + var ErrUnexpectedEnd = errors.New("unexpected end") + func Marshal(r interface{}) ([]byte, error) + func MarshalV0(v interface{}) ([]byte, error) + func Unmarshal(data []byte, v interface{}) error + func UnmarshalV0(data []byte, r interface{}) error + type ArrayIter struct + func (it *ArrayIter) HasNext() bool + func (it *ArrayIter) Next() *Value + type Error struct + func NewError(b []byte, s int, e error) Error + func (e Error) Error() string + func (e Error) Format(s fmt.State, c rune) + func (e Error) Pos() int + type ObjectIter struct + func (it *ObjectIter) HasNext() bool + func (it *ObjectIter) Next() (k, v *Value) + type StructField struct + FastErase bool + FastPath bool + I int + Kind reflect.Kind + Ptr uintptr + type StructMap struct + type Type int + const Array + const Bool + const Null + const Number + const Object + const String + func (i Type) String() string + type Value struct + func Parse(b []byte) (*Value, error) + func ParseString(s string) (*Value, error) + func Wrap(b []byte) *Value + func WrapString(s string) *Value + func WrapStringUnsafe(s string) *Value + func (v *Value) ArrayIter() (*ArrayIter, error) + func (v *Value) Bool() (bool, error) + func (v *Value) Buffer() []byte + func (v *Value) Bytes() []byte + func (v *Value) CastBool() (bool, error) + func (v *Value) CheckBytes() ([]byte, error) + func (v *Value) CheckString() (string, error) + func (v *Value) Float64() (float64, error) + func (v *Value) Get(ks ...interface{}) (*Value, error) + func (v *Value) Int() (int, error) + func (v *Value) Int64() (int64, error) + func (v *Value) IsNull() (bool, error) + func (v *Value) MustBool() bool + func (v *Value) MustCheckBytes() []byte + func (v *Value) MustCheckString() string + func (v *Value) MustFloat64() float64 + func (v *Value) MustGet(ks ...interface{}) *Value + func (v *Value) MustInt() int + func (v *Value) MustInt64() int64 + func (v *Value) MustUint() uint + func (v *Value) MustUint64() uint64 + func (v *Value) ObjectIter() (*ObjectIter, error) + func (v *Value) String() string + func (v *Value) Type() (Type, error) + func (v *Value) Uint() (uint, error) + func (v *Value) Uint64() (uint64, error) + func (v *Value) Unmarshal(r interface{}) error + func (v *Value) UnmarshalV0(r interface{}) error + type WriterV0 struct + func (w *WriterV0) Marshal(v interface{}) error