Versions in this module Expand all Collapse all v1 v1.0.0 Oct 25, 2025 Changes in this version + const MaxDepth + var ErrMergeDifferentTypes = errors.New("cannot merge different types") + var ErrMergeDifferingArrayLengths = errors.New("cannot merge arrays of differing lengths") + var ErrMergeUnknownType = errors.New("cannot merge unknown type") + var NullValue = MustParse(`null`) + func AppendToArray(array, value *Value) + func DeduplicateObjectKeysRecursively(v *Value) + func Exists(data []byte, keys ...string) bool + func GetBool(data []byte, keys ...string) bool + func GetBytes(data []byte, keys ...string) []byte + func GetFloat64(data []byte, keys ...string) float64 + func GetInt(data []byte, keys ...string) int + func GetString(data []byte, keys ...string) string + func SetNull(v *Value, path ...string) + func SetValue(v *Value, value *Value, path ...string) + func Validate(s string) error + func ValidateBytes(b []byte) error + func ValueIsNonNull(v *Value) bool + func ValueIsNull(v *Value) bool + type Object struct + func (o *Object) Del(key string) + func (o *Object) Get(key string) *Value + func (o *Object) Len() int + func (o *Object) MarshalTo(dst []byte) []byte + func (o *Object) Set(a arena.Arena, key string, value *Value) + func (o *Object) String() string + func (o *Object) Visit(f func(key []byte, v *Value)) + type ParseError struct + Err error + func NewParseError(err error) *ParseError + func (p *ParseError) Error() string + type Parser struct + func (p *Parser) Parse(s string) (*Value, error) + func (p *Parser) ParseBytes(b []byte) (*Value, error) + func (p *Parser) ParseBytesWithArena(a arena.Arena, b []byte) (*Value, error) + func (p *Parser) ParseWithArena(a arena.Arena, s string) (*Value, error) + type Scanner struct + func (sc *Scanner) Error() error + func (sc *Scanner) Init(s string) + func (sc *Scanner) InitBytes(b []byte) + func (sc *Scanner) Next() bool + func (sc *Scanner) Value() *Value + type Type int + const TypeArray + const TypeFalse + const TypeNull + const TypeNumber + const TypeObject + const TypeString + const TypeTrue + func (t Type) String() string + type Value struct + func ArrayValue(a arena.Arena) *Value + func FalseValue(a arena.Arena) *Value + func FloatValue(a arena.Arena, f float64) *Value + func IntValue(a arena.Arena, i int) *Value + func MergeValues(ar arena.Arena, a, b *Value) (v *Value, changed bool, err error) + func MergeValuesWithPath(ar arena.Arena, a, b *Value, path ...string) (v *Value, changed bool, err error) + func MustParse(s string) *Value + func MustParseBytes(b []byte) *Value + func NumberValue(a arena.Arena, s string) *Value + func ObjectValue(a arena.Arena) *Value + func Parse(s string) (*Value, error) + func ParseBytes(b []byte) (*Value, error) + func ParseBytesWithArena(a arena.Arena, b []byte) (*Value, error) + func ParseWithArena(a arena.Arena, s string) (*Value, error) + func StringValue(a arena.Arena, s string) *Value + func StringValueBytes(a arena.Arena, b []byte) *Value + func TrueValue(a arena.Arena) *Value + func (v *Value) AppendArrayItems(right *Value) + func (v *Value) Array() ([]*Value, error) + func (v *Value) Bool() (bool, error) + func (v *Value) Del(key string) + func (v *Value) Exists(keys ...string) bool + func (v *Value) Float64() (float64, error) + func (v *Value) Get(keys ...string) *Value + func (v *Value) GetArray(keys ...string) []*Value + func (v *Value) GetBool(keys ...string) bool + func (v *Value) GetFloat64(keys ...string) float64 + func (v *Value) GetInt(keys ...string) int + func (v *Value) GetInt64(keys ...string) int64 + func (v *Value) GetObject(keys ...string) *Object + func (v *Value) GetStringBytes(keys ...string) []byte + func (v *Value) GetUint(keys ...string) uint + func (v *Value) GetUint64(keys ...string) uint64 + func (v *Value) Int() (int, error) + func (v *Value) Int64() (int64, error) + func (v *Value) MarshalTo(dst []byte) []byte + func (v *Value) Object() (*Object, error) + func (v *Value) Set(a arena.Arena, key string, value *Value) + func (v *Value) SetArrayItem(a arena.Arena, idx int, value *Value) + func (v *Value) String() string + func (v *Value) StringBytes() ([]byte, error) + func (v *Value) Type() Type + func (v *Value) Uint() (uint, error) + func (v *Value) Uint64() (uint64, error)