Fatal1ty / mashumaro

Fast and well tested serialization library
Apache License 2.0
758 stars 45 forks source link

Add an option to omit values equal to defaults on serialization #161

Closed Fatal1ty closed 1 year ago

Fatal1ty commented 1 year ago

Is your feature request related to a problem? Please describe. There are cases when it's preferable to omit default values on serialization. It can potentially reduce the storage space used or the amount of data transferred.

Describe the solution you'd like Add new omit_default config and dialect option.

Describe alternatives you've considered We can remove values equal to defaults using post-serialize hook but it's not as efficient.