Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PickBool ¶
PickBool pick Bool by key, return empty array if there is no matching key or error
Example ¶
pick bool
hidden := PickBool(strings.NewReader(jsonExample), "hidden", 0) fmt.Println(hidden)
Output: [true]
func PickNumber ¶
PickNumber pick Float64 by key, return empty array if there is no matching key or error
func PickObject ¶
PickObject pick struct by key there is no limit for PickObject yet :( TODO: add limit
Example ¶
pick object
var img image PickObject(strings.NewReader(jsonExample), "image", &img) fmt.Println(img)
Output: {Images/Sun.png sun1 250 250 center}
func PickString ¶
PickString pick String by key, return empty array if there is no matching key or error
Example ¶
pick string
benchmarks := PickString(strings.NewReader(jsonExample), "benchmark", 0) fmt.Println(benchmarks)
Output: [benchmark text 1 benchmark text 2]
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.