Skip to content

v0.10.0

Compare
Choose a tag to compare
@yukinarit yukinarit released this 24 Feb 09:38
· 353 commits to main since this release
322805f

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

New Contributors

Full Changelog: v0.9.8...v0.10.0