-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keep getting error on GetString #79
Comments
You're using If you want to use package main
import (
"fmt"
"github.com/valyala/fastjson"
)
func main() {
data := []byte(`{"foo":{"bar":[123,"baz"]}}`)
s := fastjson.GetString(data, "foo", "bar", "1")
fmt.Printf("data.foo.bar[1] = %s", s)
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
According to the manual, there should be a function called GetString, but only GetStringBytes works for me.
var parser fastjson.Parser
json, err := parser.Parse(string(response.Body))
data := json.GetString("data")
./main.go:368:31: json.GetString undefined (type *fastjson.Value has no field or method GetString)
The text was updated successfully, but these errors were encountered: