Skip to content

Conversation

@twklessor
Copy link

@twklessor twklessor commented May 31, 2023

Add support for serialize_nulls build config option. This option will enable that null fields are always serialized as null.

@knaeckeKami
Copy link
Collaborator

Thanks! I'll take a look at it soon.

@knaeckeKami
Copy link
Collaborator

So, to get on the same page:

You want a feature that always includes all null values when serialization, right?

Afaik this can be done in a much more simple way by just adding

@BuiltValueSerializer(serializeNulls: true)

as an annotation to the serializer, no custom serializer is needed for that. The Custom Serializer was needed to have the distinction between absent and null values.

@twklessor
Copy link
Author

Yes that's right. I almost expected you to have an easier solution. To be honest I used the work you'd already done in the branch with the Value wrapper concept.

@twklessor
Copy link
Author

Sorry to come back months later but what is the status of this?

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.

2 participants