Skip to content

0.2.0

Compare
Choose a tag to compare
@malcolmgreaves malcolmgreaves released this 25 Aug 19:47
· 18 commits to main since this release
651d3ba
Do not serialize None values (#3)

Changes the default behavior of `serialize` to not explicitly serialize values that are `None` in `@dataclass`es, `NamedTuple`-derriving classes, or key-value `Mapping`s. When combining with JSON serialization, this will prevent a `"field_name": null` object key-value mapping from coming up.

To explicitly serialize `None` values (i.e. the old behavior), the new `no_none_values` flag can be set to `False`. New tests have been added to cover this new behavior.

Major API change, but in keeping with Semantic Versioning 2.0 rules for pre-releases (`0.x.x`), new version is `0.2.0`.