Skip to content

Support customizing deserialization, optionals, and dicts

Pre-release
Pre-release

Choose a tag to compare

@Techcable Techcable released this 15 Mar 19:01
cfa62f2

This allows customizing deserialization with DeserializeCustom, and adds builtin support for a number of additional types.

Features

  • Add DeserializeCustom abstract class for customizing deserialization.
  • Support deserializing dict[K, V]
  • Support deserializing Optional[T]
    • Other Union types are currently unsupported
  • Support default/optional fields in dataclasses

Fixes

  • Fix accidental reversal of location keys
  • Improve DeserError tracking of locations by accepting an explicit ctx parameter
  • Move deserialization code into seperate deser module
  • Support deferred evaluation of annotations (#1)

Full Changelog: v0.1.0-alpha.1...v0.1.0-alpha.2