Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to omit null values in CBOR serialization #2882

Open
Shiph opened this issue Dec 16, 2024 · 0 comments
Open

Option to omit null values in CBOR serialization #2882

Shiph opened this issue Dec 16, 2024 · 0 comments
Labels

Comments

@Shiph
Copy link

Shiph commented Dec 16, 2024

What is your use-case and why do you need this feature?
For JSON, there is an option to specify explicitNulls = false (docs) to omit properties with null values. It would be really helpful to have that option for CBOR as well. You can work around it by using encodeDefaults = false and use null as default value for the properties, but it's a bit cumbersome and doesn't work for all use cases.

Describe the solution you'd like
An option to set explicitNulls = false in CborBuilder (like for JSON).

@Shiph Shiph added the feature label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant