v0.6.0
- feat: Add @serde decorator (523dc9c)
- feat: Add serde field function (488bf00)
- feat: Add serde_skip_default field attribute (0f0b212)
- feat: Automatically put dataclass decorator (2f0cf01)
With serde
decorator and field
function, you can declare pyserde class more easily.
from serde import serde, field
@serde
class Foo:
a : List[str] = field(default_factory=list, skip_if_false=True)
The declaration until v0.5.3 still works.
from dataclasses import dataclass
from serde import serialize, deserialize
@deserialize
@serialize
@dataclass
class Foo:
a : List[str] = field(default_factory=list, metadata={'serde_skip_if_false': True})