- Added support for the
auto_snake
decorator which can automatically convert data keys from camelCase and PascalCase to snake_case.
- Added support for fallback to dict for unsupported types when downcasting
- Fixed the bug introduced in 1.6.0 which accidentally left the downcasts as the base class
- Added support for more than 1 level of subclass for when downcasting
- Some exceptions weren't tracking the debug name
- Added ability to specify downcasts based on a field value in the data
- Fixed issue where unhandled fields were not recorded correctly when field and property names differ
- Added the ability to allow certain fields through even when
throw_on_unhandled
is set. - Added
@constructed
decorator which takes a function which will be called with any newly created instance.
ClassVar
s are now ignored when deserializing
- Added ability to specify a default value for missing fields in the data using the
default
decorator.
- Fixed debug name for dictionary attributes for exceptions
- Ability to throw an exception on unhandled fields
- Ability to deserialize to types which have a constructor specified
- Support for storing raw data on the deserialized object
- Simplified error messages when comparing against None types
- Added better error messages for union deserialization failures
- Now does explicit checks for attributes before using them instead of try-except to make debugging easier (fewer exceptions raised)
Initial release