Documentation
¶
Index ¶
- func Extract[T any](simpleJson *simplejson.Json, key string) (T, error)
- func GetList(simpleJson *simplejson.Json, key string) (simpleJsons []*simplejson.Json, err error)
- func Inspect[T any](simpleJson *simplejson.Json, key string) (T, error)
- func List(elements []interface{}) (simpleJsons []*simplejson.Json)
- func Load(data []byte) (simpleJson *simplejson.Json, err error)
- func Resolve[T any](simpleJson *simplejson.Json) (T, error)
- func Wrap(value interface{}) (simpleJson *simplejson.Json)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Extract ¶
func Extract[T any](simpleJson *simplejson.Json, key string) (T, error)
Extract retrieves the value associated with the given key in the JSON object.
func GetList ¶
func GetList(simpleJson *simplejson.Json, key string) (simpleJsons []*simplejson.Json, err error)
GetList retrieves a slice of simplejson.Json objects from the key's list (a[key]).
func Inspect ¶
func Inspect[T any](simpleJson *simplejson.Json, key string) (T, error)
Inspect retrieves the value of the given key if it exists in the JSON object, returning the zero value if the key is missing.
func List ¶
func List(elements []interface{}) (simpleJsons []*simplejson.Json)
List converts a slice of items into a slice of simplejson.Json objects.
func Load ¶
func Load(data []byte) (simpleJson *simplejson.Json, err error)
Load creates a simplejson.Json instance from bytes, same as simplejson.NewJson(data).
func Wrap ¶
func Wrap(value interface{}) (simpleJson *simplejson.Json)
Wrap creates a simplejson.Json instance with the provided value as the root element.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.