upickle
upickle copied to clipboard
Add `serializeNones` config to allow omitting `None` fields in case classes
Motivation
When enabling serializeDefaults together with optionsAsNulls this writes optional fields that are None as null. in JSON null is not the same as a missing field. This new setting changes upickle behavior to serialize None as a missing field instead of null.
TODOs
- [ ] Add check to disallow
serializeNones = falsetogether withoptionsAsNulls = falsebecause it doesn't make sense to use these two settings together.