Skip to content
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

How to disable helpful deserialization error messages for unknown attributes? #1190

Open
VeaaC opened this issue Sep 11, 2024 · 0 comments
Open

Comments

@VeaaC
Copy link

VeaaC commented Sep 11, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant