Skip to content

Conversation

@lolgab
Copy link
Member

@lolgab lolgab commented May 4, 2025

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 lolgab changed the title Add serializeNones config to allow omitting None fields in case c… Add serializeNones config to allow omitting None fields in case classes May 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant