msgspec
msgspec copied to clipboard
Add forbid_unknown_fields as optional bool argument to all decoders.
When forbid_unknown_fields is True, then errors are raised for unknown fields on all Structs, dataclasses, and TypedDicts.
When forbid_unknown_fields is False, then errors for unknown fields are only raised on Structs defined with forbid_unknown_fields=True.