Skip to content

Option to omit empty fields#26

Merged
kevmoo merged 4 commits intomasterfrom
omit_empty_fields
Jul 25, 2017
Merged

Option to omit empty fields#26
kevmoo merged 4 commits intomasterfrom
omit_empty_fields

Conversation

@kevmoo
Copy link
Copy Markdown
Collaborator

@kevmoo kevmoo commented Jul 25, 2017

No description provided.

@kevmoo kevmoo force-pushed the omit_empty_fields branch from 6ee1c16 to e488748 Compare July 25, 2017 01:24
@kevmoo kevmoo force-pushed the omit_empty_fields branch from b248b44 to 7c131ad Compare July 25, 2017 16:10
@kevmoo kevmoo changed the title WIP: Omit empty fields Option to omit empty fields Jul 25, 2017
@kevmoo kevmoo requested a review from natebosch July 25, 2017 16:11
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] 'Whether the generator should...'

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is true the default? Backwards compatibility?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup. It can also lead to some weirdness – like having a completely empty Map returned from toJson – better to make it opt-in.

Also the code generated is a lot uglier.

@kevmoo kevmoo force-pushed the omit_empty_fields branch from 7c131ad to 86098bc Compare July 25, 2017 17:19
@kevmoo kevmoo merged commit 86098bc into master Jul 25, 2017
@kevmoo kevmoo deleted the omit_empty_fields branch July 25, 2017 18:01
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