Documentation
¶
Index ¶
- type Array
- func (a Array) Array(idx int) Array
- func (a Array) Bool(idx int) (bool, error)
- func (a Array) Bytes() ([]byte, error)
- func (a Array) Err() error
- func (a Array) Float(idx int) (float64, error)
- func (a Array) Len() (int, error)
- func (a Array) Map(idx int) Map
- func (a Array) MustBool(idx int) bool
- func (a Array) MustBytes() []byte
- func (a Array) MustFloat(idx int) float64
- func (a Array) MustInner() []interface{}
- func (a Array) MustLen() int
- func (a Array) MustString(idx int) string
- func (a Array) String(idx int) (string, error)
- type Map
- func (m Map) Array(key string) Array
- func (m Map) Bool(key string) (bool, error)
- func (m Map) Bytes() ([]byte, error)
- func (m Map) Err() error
- func (m Map) Float(key string) (float64, error)
- func (m Map) Has(key string) (bool, error)
- func (m Map) Inner() (map[string]interface{}, error)
- func (m Map) Map(key string) Map
- func (m Map) MustBool(key string) bool
- func (m Map) MustBytes() []byte
- func (m Map) MustFloat(key string) float64
- func (m Map) MustHas(key string) bool
- func (m Map) MustInner() map[string]interface{}
- func (m Map) MustString(key string) string
- func (m Map) String(key string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Array ¶
type Array struct {
// contains filtered or unexported fields
}
Array provides methods to either navigate through the content of a JSON array or propagate any error that has occurred
func ArrayFromBytes ¶
ArrayFromBytes creates an Array from a []byte
func ArrayFromReader ¶
ArrayFromReader creates an Array from an io.Reader
func (Array) Array ¶
Array returns the array found at index `idx` in the array; errors will be propagated
func (Array) Bool ¶
Bool returns the value of a bool at index `idx` in the array, or a propagated error
func (Array) Bytes ¶
Bytes returns the serialized value into a slice of bytes, or a propagated error
func (Array) Float ¶
Float returns the value of a float at index `idx` in the array, or a propagated error
func (Array) MustBool ¶
MustBool returns the value of a bool at index `idx` in the array, or panics if there was an error
func (Array) MustBytes ¶
MustBytes returns the serialized value into a slice of bytes, or panics if there was an error
func (Array) MustFloat ¶
MustFloat returns the value of a float at index `idx` in the array, or panics if there was an error
func (Array) MustInner ¶
func (a Array) MustInner() []interface{}
MustInner returns the `[]interface{}` which this `Array` represents, or panics if there was an error
func (Array) MustString ¶
MustString returns the value of a string at index `idx` in the array, or panics if there was an error
type Map ¶
type Map struct {
// contains filtered or unexported fields
}
Map provides methods to either navigate through the content of a JSON object or propagate any error that has occurred
func MapFromBytes ¶
MapFromBytes creates a Map from a []byte
func MapFromReader ¶
MapFromReader creates a Map from an io.Reader
func (Map) Float ¶
Float returns the value of a float at key `key` in the map, or a propagated error
func (Map) Inner ¶
Inner returns the `[]interface{}` which this `Array` represents, or a propagated error
func (Map) MustBool ¶
MustBool returns the value of a bool at key `key` in the map, or panics if there was an error
func (Map) MustBytes ¶
MustBytes returns the serialized value into a slice of bytes, or panics if there was an error
func (Map) MustFloat ¶
MustFloat returns the value of a float at key `key` in the map, or panics if there was an error
func (Map) MustHas ¶
MustHas returns true if the map contains the key `key`, or panics if there was an error
func (Map) MustInner ¶
MustInner returns the `[]interface{}` which this `Array` represents, or panics if there was an error
func (Map) MustString ¶
MustString returns the value of a string at key `key` in the map, or panics if there was an error