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

Add #[serde(skip_serializing_if = "Option::is_none")] to all fields #79

Merged
merged 1 commit into from
Apr 9, 2024

Conversation

stefansundin
Copy link
Contributor

Hello,

I think it would be nice if there weren't any null values in my serialized data. After all, if I understand the spec then those keys are not present in the database that the library read, so I feel like it would be best if they were not present in my serialized output at all.

I am unaware if there's a cleaner way to apply the serde attribute other than repeating it like this.

Please let me know if this makes sense or if you want any changes made. Thank you!

@oschwald
Copy link
Owner

oschwald commented Apr 9, 2024

I agree. This makes sense. Too bad there isn't a less verbose way to do this.

@oschwald oschwald merged commit b5a6ccc into oschwald:main Apr 9, 2024
19 checks passed
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