json
json copied to clipboard
How to disable helpful deserialization error messages for unknown attributes?
When encountering an unknown attribute serde_json is listing all available attributes, e.g.
invalid JSON: unknown field `tell_me_your_secrets`, expected one of
`foo`,
`bar`,
`experiment_38a`
at line 1 column 24
This makes it easy to discover semi-hidden parts of an API (e.g. experiments that only some users of the API should be exposed to).
Is there a way to disable this behaviour?