Skip to content

Option to skip null members when serializing (autogenerated)? #136

@Tinche

Description

@Tinche

Hi!

I'm using generation of serializers. I have a class (that I want to serialize) with a string member, with a MessagePackMember attribute on it. When I serialize an instance, the generated msgpack contains a key-value pair (member: nil), which is correct.

However, it would be great if there was an option to skip serializing members with null values. Currently I'm editing the generated code to put in an if check manually, but adding a property (skipSerializingWhenNull?) to MessagePackMember would be super!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementRequires or request to feature enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions