Documentation ¶
Index ¶
Constants ¶
View Source
const ( NOT_JSON = iota NULL BOOLEAN NUMBER STRING ARRAY OBJECT )
The data types supported by Value
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnnotatedValue ¶
type AnnotatedValue interface { Value GetAttachment(key string) interface{} SetAttachment(key string, val interface{}) RemoveAttachment(key string) interface{} }
func NewAnnotatedValue ¶
func NewAnnotatedValue(val interface{}) AnnotatedValue
Create an AnnotatedValue to hold attachments
type Undefined ¶
type Undefined string
When you try to access a nested property or index that does not exist, the return value will be nil, and the return error will be Undefined.
type Unsettable ¶
type Unsettable string
When you try to set a nested property or index that does not exist, the return error will be Unsettable.
func (Unsettable) Error ¶
func (this Unsettable) Error() string
Description of which property or index was unsettable (if known).
type Value ¶
type Value interface { Type() int // Data type constant Actual() interface{} // Native Go representation Duplicate() Value // Shallow copy DuplicateForUpdate() Value // Deep copy for UPDATE statements; returns Values whose SetIndex() will extend arrays as needed Bytes() []byte // JSON byte encoding Field(field string) (Value, error) // Object field dereference SetField(field string, val interface{}) error // Object field setting Index(index int) (Value, error) // Array index dereference SetIndex(index int, val interface{}) error // Array index setting }
An interface for storing and manipulating a (possibly JSON) value.
func NewValueFromBytes ¶
Create a new Value from a slice of bytes. (this need not be valid JSON)
Click to show internal directories.
Click to hide internal directories.