18 lines
297 B
Go
18 lines
297 B
Go
package main
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/tidwall/gjson"
|
|
)
|
|
|
|
func TestGjson(t *testing.T) {
|
|
// "{"name": {""}}"
|
|
content := `{"name":{"first":"int ","last":"Prichard"},"age": (47)}`
|
|
r := gjson.Parse(content)
|
|
r.ForEach(func(k, v gjson.Result) bool {
|
|
t.Error(k, v.Raw)
|
|
return true
|
|
})
|
|
}
|