Documentation ¶
Index ¶
- Variables
- type Array
- type ArrayConstructor
- type ArrayConstructorError
- type Document
- func (d *Document) Append(elems ...*Element) *Document
- func (d *Document) Copy() *Document
- func (d *Document) ElementAtIndex(idx int) *Element
- func (d *Document) Iterator() fun.Iterator[*Element]
- func (d *Document) KeyAtIndex(idx int) string
- func (d *Document) Len() int
- func (d *Document) MarshalJSON() ([]byte, error)
- func (d *Document) UnmarshalJSON(in []byte) error
- type DocumentConstructor
- type DocumentConstructorError
- type Element
- type ElementConstructor
- func (ElementConstructor) Array(key string, a *Array) *Element
- func (ElementConstructor) ArrayFromElements(key string, elems ...*Value) *Element
- func (ElementConstructor) Boolean(key string, val bool) *Element
- func (ElementConstructor) Float32(key string, n float32) *Element
- func (ElementConstructor) Float64(key string, n float64) *Element
- func (ElementConstructor) Int(key string, n int) *Element
- func (ElementConstructor) Int32(key string, n int32) *Element
- func (ElementConstructor) Int64(key string, n int64) *Element
- func (ElementConstructor) Nil(key string) *Element
- func (ElementConstructor) Object(key string, doc *Document) *Element
- func (ElementConstructor) ObjectFromElements(key string, elems ...*Element) *Element
- func (ElementConstructor) String(key string, value string) *Element
- func (ElementConstructor) Value(key string, val *Value) *Element
- type Type
- type Value
- func (v *Value) Array() *Array
- func (v *Value) ArrayOK() (*Array, bool)
- func (v *Value) Boolean() bool
- func (v *Value) BooleanOK() (bool, bool)
- func (v *Value) Copy() *Value
- func (v *Value) Document() *Document
- func (v *Value) DocumentOK() (*Document, bool)
- func (v *Value) Float64() float64
- func (v *Value) Float64OK() (float64, bool)
- func (v *Value) Int() int
- func (v *Value) IntOK() (int, bool)
- func (v *Value) Interface() any
- func (v *Value) MarshalJSON() ([]byte, error)
- func (v *Value) StringValue() string
- func (v *Value) StringValueOK() (string, bool)
- func (v *Value) Type() Type
- func (v *Value) UnmarshalJSON(in []byte) error
- type ValueConstructor
- func (ValueConstructor) Array(a *Array) *Value
- func (ValueConstructor) ArrayFromElements(elems ...*Value) *Value
- func (ValueConstructor) Boolean(b bool) *Value
- func (ValueConstructor) Bytes(in []byte) *Value
- func (ValueConstructor) Float32(n float32) *Value
- func (ValueConstructor) Float64(n float64) *Value
- func (ValueConstructor) Int(n int) *Value
- func (ValueConstructor) Int32(n int32) *Value
- func (ValueConstructor) Int64(n int64) *Value
- func (ValueConstructor) Nil() *Value
- func (ValueConstructor) Object(doc *Document) *Value
- func (ValueConstructor) ObjectFromElements(elems ...*Element) *Value
- func (ValueConstructor) Reader(in io.Reader) *Value
- func (ValueConstructor) String(s string) *Value
- type ValueConstructorError
Constants ¶
This section is empty.
Variables ¶
View Source
var AC = ArrayConstructor{}
View Source
var ACE = ArrayConstructorError{}
View Source
var DC = DocumentConstructor{}
View Source
var DCE = DocumentConstructorError{}
View Source
var EC = ElementConstructor{}
View Source
var VC = ValueConstructor{}
View Source
var VCE = ValueConstructorError{}
Functions ¶
This section is empty.
Types ¶
type Array ¶
type Array struct {
// contains filtered or unexported fields
}
func (*Array) MarshalJSON ¶
func (*Array) UnmarshalJSON ¶
type ArrayConstructor ¶
type ArrayConstructor struct{}
func (ArrayConstructor) Bytes ¶
func (ArrayConstructor) Bytes(in []byte) *Array
func (ArrayConstructor) Elements ¶
func (ArrayConstructor) Elements(elems ...*Value) *Array
func (ArrayConstructor) Make ¶
func (ArrayConstructor) Make(n int) *Array
func (ArrayConstructor) New ¶
func (ArrayConstructor) New() *Array
type ArrayConstructorError ¶ added in v0.2.0
type ArrayConstructorError struct{}
type Document ¶
type Document struct {
// contains filtered or unexported fields
}
func (*Document) ElementAtIndex ¶
func (*Document) KeyAtIndex ¶
func (*Document) MarshalJSON ¶
func (*Document) UnmarshalJSON ¶
type DocumentConstructor ¶
type DocumentConstructor struct{}
func (DocumentConstructor) Bytes ¶
func (DocumentConstructor) Bytes(in []byte) *Document
func (DocumentConstructor) Elements ¶
func (DocumentConstructor) Elements(elems ...*Element) *Document
func (DocumentConstructor) Make ¶
func (DocumentConstructor) Make(n int) *Document
func (DocumentConstructor) New ¶
func (DocumentConstructor) New() *Document
type DocumentConstructorError ¶
type DocumentConstructorError struct{}
type ElementConstructor ¶
type ElementConstructor struct{}
func (ElementConstructor) ArrayFromElements ¶
func (ElementConstructor) ArrayFromElements(key string, elems ...*Value) *Element
func (ElementConstructor) Boolean ¶
func (ElementConstructor) Boolean(key string, val bool) *Element
func (ElementConstructor) Float32 ¶
func (ElementConstructor) Float32(key string, n float32) *Element
func (ElementConstructor) Float64 ¶
func (ElementConstructor) Float64(key string, n float64) *Element
func (ElementConstructor) Nil ¶
func (ElementConstructor) Nil(key string) *Element
func (ElementConstructor) Object ¶
func (ElementConstructor) Object(key string, doc *Document) *Element
func (ElementConstructor) ObjectFromElements ¶
func (ElementConstructor) ObjectFromElements(key string, elems ...*Element) *Element
type Type ¶
type Type int
Type describes
const ( // String is a json string String Type = iota // Number is a json number. Number // Bool is a boolean value that is either true or false. Bool // Null is a null json value. Null // NumberInteger refers to integer values. This translates to a // JSON number. NumberInteger // NumberInteger refers to a float/double value. This translates to a // JSON number. NumberDouble // ObjectValues are json objects. ObjectValue // ArrayValues are json arrays. ArrayValue )
type Value ¶
type Value struct {
// contains filtered or unexported fields
}
func (*Value) DocumentOK ¶
func (*Value) MarshalJSON ¶
func (*Value) StringValue ¶
func (*Value) StringValueOK ¶
func (*Value) UnmarshalJSON ¶
type ValueConstructor ¶
type ValueConstructor struct{}
func (ValueConstructor) Array ¶
func (ValueConstructor) Array(a *Array) *Value
func (ValueConstructor) ArrayFromElements ¶
func (ValueConstructor) ArrayFromElements(elems ...*Value) *Value
func (ValueConstructor) Boolean ¶
func (ValueConstructor) Boolean(b bool) *Value
func (ValueConstructor) Bytes ¶
func (ValueConstructor) Bytes(in []byte) *Value
func (ValueConstructor) Float32 ¶
func (ValueConstructor) Float32(n float32) *Value
func (ValueConstructor) Float64 ¶
func (ValueConstructor) Float64(n float64) *Value
func (ValueConstructor) Int ¶
func (ValueConstructor) Int(n int) *Value
func (ValueConstructor) Int32 ¶
func (ValueConstructor) Int32(n int32) *Value
func (ValueConstructor) Int64 ¶
func (ValueConstructor) Int64(n int64) *Value
func (ValueConstructor) Nil ¶
func (ValueConstructor) Nil() *Value
func (ValueConstructor) Object ¶
func (ValueConstructor) Object(doc *Document) *Value
func (ValueConstructor) ObjectFromElements ¶
func (ValueConstructor) ObjectFromElements(elems ...*Element) *Value
func (ValueConstructor) String ¶
func (ValueConstructor) String(s string) *Value
type ValueConstructorError ¶ added in v0.2.0
type ValueConstructorError struct{}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.