-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
encoding/json: no field information is shown when decoding a map fails #67210
Comments
Could you share a specific example that reproduce the issue? Thanks. |
Here is the minimal program to reproduce. It reports: (In my actual case, the map has a lot of fields.) |
@cherrymui maybe the |
The v2 JSON discussion (#63397) includes a Support for populating this is planned, but not currently implemented in the prototype implementation at https://github.com/go-json-experiment/json. |
Go version
go version go1.22.0 darwin/amd64
Output of
go env
in your module/workspace:What did you do?
I'm decoding a
map
with many fields, but the error I got is:There's no information about which field is causing the error.
What did you see happen?
The error information when decoding
map
is vague, it doesn't indicate which field is causing the error.What did you expect to see?
I expect to see which field(the specific
key
orvalue
) is causing the error.The text was updated successfully, but these errors were encountered: