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
package main import ( "strings" "github.com/json-iterator/go" ) var JSON = jsoniter.ConfigCompatibleWithStandardLibrary type payload struct { Code int `json:"code"` Data interface{} `json:"data"` } func main() { data := map[string]interface{}{} err := call(&data) if err != nil { panic(err) } if data["k"] != "v" { panic("should equal") } } func call(rsp interface{}) error { raw := `{"code":1,"data":{"k":"v"}}` p := payload{Data: rsp} decoder := JSON.NewDecoder(strings.NewReader(raw)) decoder.UseNumber() // looks like there is some wrong in adapter.iter.cfg = cfg.frozeWithCacheReuse() err := decoder.Decode(&p) return err }
The text was updated successfully, but these errors were encountered:
25fa392
should be fixed now
Sorry, something went wrong.
fix json-iterator#245, always reuse existing value even UseNumber
2451fb4
No branches or pull requests
The text was updated successfully, but these errors were encountered: