Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
encoding/json: use different error type for unknown field if they are disallowed #40982
On Go 1.15 and below, json decoder returns a generic error when unknown fields are disallowed (via
It may be useful to return a different error type so the caller can detect when it is the case.
The only way to detect that currently is to interpret the string returned by