Documentation
¶
Index ¶
- Constants
- type Type
- type Value
- func (v Value) Array() ([]Value, error)
- func (v Value) Bool() (bool, error)
- func (v Value) Index(i int) Value
- func (v Value) IsNull() (bool, error)
- func (v Value) Key(key string) Value
- func (v Value) Len() (int, error)
- func (v Value) Lookup(keys ...string) Value
- func (v Value) Num() (float64, error)
- func (v Value) Object() (map[string]Value, error)
- func (v Value) Str() (string, error)
- func (v Value) String() string
- func (v Value) Type() Type
- func (v Value) Walk(fn func(v Value) bool)
Constants ¶
View Source
const ( TypeObject = Type(iota) TypeArray TypeNum TypeStr TypeBool TypeNull TypeInvalid )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Value ¶
Value is an object, array, string, number, or bool
func (Value) Array ¶
Array returns the value as a slice of values or an error if the value is not an array
func (Value) Index ¶
Index returns the value at the specified index. If the value is not an array, the returned value will contain an error
func (Value) Key ¶
Key returns the value at the specified key. If the value is not an object, the returned value will contain an error
func (Value) Object ¶
Object returns the value as a map of values or an error if the value is not an object
Click to show internal directories.
Click to hide internal directories.