proposal: encoding/json: add error var to compare the returned error when using json.Decoder.DisallowUnknownFields() #29035
Comments
Change https://golang.org/cl/152297 mentions this issue: |
Per discussion with @golang/proposal-review, putting on hold until we can review JSON issues en masse. |
Hello @andybons, do you have any idea of when you will be able to review these JSON issues en masse? Thanks. |
Looks absolutely ugly in retrospect to golang 1.13 with new error handling ( |
@s3rj1k please be more objective, this was the best solution in the time when I face this problem, instead of judge, please provide an example using |
@jaswdr I was talking about golang core library mess. not your solution :) |
@s3rj1k ack |
Can we revisit this? Being able to handle the error properly would allow me to achieve that. |
the only solution i could think about without writing lot of code is
|
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
Some way to check if the error happen.
What did you see instead?
No way to do this instead of checking the error string
If this is accepted I really want to work on it.
The text was updated successfully, but these errors were encountered: