json icon indicating copy to clipboard operation
json copied to clipboard

How to disable helpful deserialization error messages for unknown attributes?

Open VeaaC opened this issue 1 year ago • 0 comments

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?

VeaaC avatar Sep 11 '24 07:09 VeaaC