proposal: encoding/json: require all fields #44138
Closed
Comments
@seankhliao Thanks for the reply. Thanks |
Yes, this is a duplicate of #19858. We can't provide timeline estimates, sorry - taking a look at all JSON proposals is a big chunk of ongoing work. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @rsc @adg
I've noticed that encoding/json doesn't raise an error if any field is not present in the body payload.
Example:
Ideally, this function should give an error like
missingfield name
.DisallowUnknownFields
just take care of extra fields but not the missing field.Golang version: 1.15.6
Let me know if I've missed anything to fix it?
The text was updated successfully, but these errors were encountered: