v0.10.0
What's Changed
New features
pyserde can (de)serialize dataclasses without @serde
since v0.10.0. This feature is convenient when you want to use classes declared in external libraries or a type checker doesn't work with @serde
decorator. See this example. Thanks @Kobzol!
@dataclass
class Foo:
i: int
s: str
f: float
b: bool
f = Foo(i=10, s='foo', f=100.0, b=True)
print(f"Into Json: {to_json(f)}")
s = '{"i": 10, "s": "foo", "f": 100.0, "b": true}'
print(f"From Json: {from_json(Foo, s)}")
- Generate serialization/deserialization code for dataclasses not marked with @serde by @Kobzol in #312
- Use default options for unmarked dataclass code generation by @Kobzol in #314
- Allow serializing and deserializing root dataclasses by @Kobzol in #315
Bug fixes
- Fix deserialization with NewType and Untagged Union by @yukinarit in #313
CI
- Set commit author and title for commits in gh-pages by @yukinarit in #316
Documentation
- Migrate to Github's changelog by @yukinarit in #311
- Update contributors by @yukinarit in #317
- Document (de)serializing dataclasses without @serde by @yukinarit in #319
New Contributors
Full Changelog: v0.9.8...v0.10.0