We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Following code would first result in an err, then would panic:
package main import ( "fmt" "github.com/buger/jsonparser" ) func main() { data := `{"id":` jsonparser.EachKey([]byte(data), func(idx int, value []byte, vt jsonparser.ValueType, currentErr error) { if currentErr != nil { fmt.Printf("Error: %v\n", currentErr) return } fmt.Printf("idx: %d value: %s\n", idx, string(value)) }, []string{"id"}, []string{"method"}, []string{"params"}) }
Maybe this is similar to #100?
The text was updated successfully, but these errors were encountered:
I've found error output not being checked from Get method here https://github.com/buger/jsonparser/blob/master/parser.go#L410 adding simple if e != nil { return -1 } helped me
if e != nil {
return -1
}
Sorry, something went wrong.
No branches or pull requests
Following code would first result in an err, then would panic:
Maybe this is similar to #100?
The text was updated successfully, but these errors were encountered: