We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
json.Unmarshal causes panic when a map to a struct values that has UnmarshalText is given.
json.Unmarshal
UnmarshalText
https://gopherjs.github.io/playground/#/QeyQssFhyq
package main import ( "encoding/json" "fmt" ) type Object [3]byte func (o Object) UnmarshalText(text []byte) error { return nil } func main() { const jsonStr = `{"foo": "foo"}` vals := map[string]Object{} if err := json.Unmarshal([]byte(jsonStr), &vals); err != nil { panic(err) } fmt.Printf("%#v\n", vals["foo"]) }
No panics.
panic: ap.$get is not a function
The text was updated successfully, but these errors were encountered:
It looks like this is duplicated with #662?
Sorry, something went wrong.
No branches or pull requests
json.Unmarshal
causes panic when a map to a struct values that hasUnmarshalText
is given.https://gopherjs.github.io/playground/#/QeyQssFhyq
Expected result:
No panics.
Actual result
The text was updated successfully, but these errors were encountered: