Documentation
¶
Index ¶
- func AsStreamTransformer(transformer ValueTransformer) token.StreamTransformer
- func SafeValuesEqual(v1, v2 Value) bool
- func ValuesEqual(v1, v2 Value) bool
- type Array
- func (a *Array) Advance() bool
- func (a *Array) AsArray() (*Array, bool)
- func (c *Array) AsObject() (*Object, bool)
- func (c *Array) AsScalar() (*token.Scalar, bool)
- func (a *Array) Clone() (Value, func())
- func (a *Array) CloneArray() (*Array, func())
- func (c *Array) Copy(w token.WriteStream)
- func (c *Array) CurrentValue() Value
- func (c *Array) Discard()
- func (c *Array) Elided() bool
- func (a *Array) Equal(v Value) bool
- type Collection
- type Iterator
- type Object
- func (o *Object) Advance() bool
- func (c *Object) AsArray() (*Array, bool)
- func (o *Object) AsObject() (*Object, bool)
- func (c *Object) AsScalar() (*token.Scalar, bool)
- func (o *Object) Clone() (Value, func())
- func (o *Object) CloneObject() (*Object, func())
- func (c *Object) Copy(w token.WriteStream)
- func (o *Object) CurrentKeyVal() (*token.Scalar, Value)
- func (c *Object) CurrentValue() Value
- func (c *Object) Discard()
- func (c *Object) Elided() bool
- func (o *Object) Equal(v Value) bool
- type Scalar
- func (s *Scalar) AsArray() (*Array, bool)
- func (s *Scalar) AsObject() (*Object, bool)
- func (s *Scalar) AsScalar() (*token.Scalar, bool)
- func (s *Scalar) Clone() (Value, func())
- func (s *Scalar) Copy(w token.WriteStream)
- func (s *Scalar) Discard()
- func (s *Scalar) Equal(v Value) bool
- func (s *Scalar) Scalar() *token.Scalar
- type Value
- type ValueTransformer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsStreamTransformer ¶
func AsStreamTransformer(transformer ValueTransformer) token.StreamTransformer
AsStreamTransformer turns a ValueTransformer into a StreamTransformer, so it can be applied to a json stream.
func SafeValuesEqual ¶
SafeValuesEqual returns true if v1 and v2 are equal, without advancing either of them.
func ValuesEqual ¶
ValuesEqual returns true if v1 and v2 are equal. It may advance v1 and / or v2.
Types ¶
type Array ¶
type Array struct {
// contains filtered or unexported fields
}
func (*Array) CloneArray ¶
func (*Array) Copy ¶
func (c *Array) Copy(w token.WriteStream)
func (*Array) CurrentValue ¶
func (c *Array) CurrentValue() Value
type Collection ¶
type Iterator ¶
type Iterator struct {
// contains filtered or unexported fields
}
func New ¶
func New(stream token.ReadStream) *Iterator
func (*Iterator) CurrentValue ¶
type Object ¶
type Object struct {
// contains filtered or unexported fields
}
func (*Object) CloneObject ¶
func (*Object) Copy ¶
func (c *Object) Copy(w token.WriteStream)
func (*Object) CurrentValue ¶
func (c *Object) CurrentValue() Value
type ValueTransformer ¶
type ValueTransformer interface {
TransformValue(value Value, out token.WriteStream)
}
A ValueTransformer can transform a StreamedValue into a json stream. Use the AsStreamTransformer function to turn it into a StreamTransformer which can then be applied.
Click to show internal directories.
Click to hide internal directories.