upickle icon indicating copy to clipboard operation
upickle copied to clipboard

Add `serializeNones` config to allow omitting `None` fields in case classes

Open lolgab opened this issue 11 months ago • 0 comments

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 = false together with optionsAsNulls = false because it doesn't make sense to use these two settings together.

lolgab avatar May 04 '25 15:05 lolgab