Skip to content

Exclude empty lists from to_dict output #16

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

Merged
merged 3 commits into from
Jan 31, 2020
Merged

Exclude empty lists from to_dict output #16

merged 3 commits into from
Jan 31, 2020

Conversation

cetanu
Copy link
Collaborator

@cetanu cetanu commented Jan 29, 2020

I've found to_dict output to be very verbose and in particular filled with empty lists.

Not quite sure if this PR is 100% okay with the author - if it would be better gated behind some argument passed into to_dict then I'm okay to make the necessary changes.

As far as I know, I've never seen a required list field in a protocol buffer, which is why I have proposed the change in its current state

@danielgtaylor danielgtaylor added the enhancement New feature or request label Jan 31, 2020
@danielgtaylor
Copy link
Owner

I believe this is correct. Empty lists should not be serialized by default. Thanks! 👍

@danielgtaylor danielgtaylor merged commit f2e8afc into danielgtaylor:master Jan 31, 2020
@cetanu cetanu deleted the patch-1 branch January 31, 2020 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants