Adds support to `deserialize` to handle types that have default values on one or more fields. When a field-value pair is not found during `deserialize`, it will use the type's defined default value for the field as the `value`. Supports arbitrary nesting of default values.
Thus the following will work now as of `0.4.0`:
from dataclasses import dataclass from core_utils.serialization import *
dataclass(frozen=True) class Hello: name: str value: int = 42
Bugfix: support for properly deserializing Union types that contain generics (e.g. collection types such as `List`, `Dict`, etc.). In general, the following will work now:
deserialize(Union[A[B], C[D]], x)
For `dataclass(frozen=True) class A(Generic[B])` and `dataclass(frozen=True) class C(Generic[D])`.
0.3.1
0.3.0
0.2.0
0.1.2
Includes a bug fix, removing a debugging print statement in the deserialization routine that was accidentally left in in the prior release.