-
Notifications
You must be signed in to change notification settings - Fork 18k
encoding/json: add context during decoding when disallowUnknownFields is set #71638
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
Conversation
… is set Fixes golang#58649 without relying on the mentioned refactoring/cleaning in golang#43126 With most efforts redirected towards encoding/json v2. I don't think golang#43126 will ever be addressed in v1. I don't think we should consider it as a requirement for this patch. This could have been added as part of golang@2596a0c encoding/json v2 is moving in the same direction by adding context by default as shown in https://github.com/go-json-experiment/json/blob/4e0381018ad68adc9c0cb7896d109c994429654e/errors.go#L364-L373 But we don't need to wait for v2 to become stable to improve UX and and save users some time, and help them keep their hair!
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
This PR (HEAD: 1dcfad0) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/648055. Important tips:
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/648055. |
Message from Gopher Robot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be During May-July and Nov-Jan the Go project is in a code freeze, during which Please don’t reply on this GitHub thread. Visit golang.org/cl/648055. |
This PR (HEAD: 5c43046) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/648055. Important tips:
|
Message from Joseph Tsai: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/648055. |
Message from ayoub mrini: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/648055. |
Message from ayoub mrini: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/648055. |
Message from ayoub mrini: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/648055. |
Message from Joseph Tsai: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/648055. |
Message from ayoub mrini: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/648055. |
Message from Joseph Tsai: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/648055. |
|
With most efforts redirected towards encoding/json v2. I don't think
refactoring/cleaning changes in #43126 will ever be addressed in v1.
I don't think we should consider it as a requirement for this patch.
This could have been added as part of 2596a0c
encoding/json v2 is moving in the same direction by adding context by
default as shown in https://github.com/go-json-experiment/json/blob/4e0381018ad68adc9c0cb7896d109c994429654e/errors.go#L364-L373
But we don't need to wait for v2 to become stable to improve UX
and save users some time, and help them keep their hair!
Fixes #58649
This PR will be imported into Gerrit with the title and first
comment (this text) used to generate the subject and body of
the Gerrit change.
Please ensure you adhere to every item in this list.
More info can be found at https://github.com/golang/go/wiki/CommitMessage
net/http: frob the quux before blarfing
"This change modifies Go to ___________"
really needed (ASCII art, table, or long link)
Fixes #1234
orUpdates #1234
(the latter if this is not a complete fix) to this comment
golang/go
you can use theowner/repo#issue_number
syntax:Fixes golang/tools#1234
Our Gerrit server & GitHub bots enforce CLA compliance instead.