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

Changes serialization type from default to non-empty. #228

Merged

Conversation

dmitraver
Copy link
Contributor

Fixes #216.

Settings will be serialized anyway even if no parameters are set and defaults are used.

@thinkingserious thinkingserious added status: code review request requesting a community code review or review from Twilio difficulty: medium fix is medium in difficulty hacktoberfest labels Oct 3, 2017
SubscriptionTrackingSetting setting = new SubscriptionTrackingSetting();
setting.setEnable(false);

String jsonTwo = mapper.writeValueAsString(setting);
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be jsonOne. This is assuming that the numeral part of the variable name is the expected number of fields in the serialized version. If that's not the case, then can you elaborate on the naming convention?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, you are right, just a stupid copy-pasting issue ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will fix that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

GoogleAnalyticsSetting setting = new GoogleAnalyticsSetting();
setting.setEnable(false);

String jsonTwo = mapper.writeValueAsString(setting);
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be jsonOne. This is assuming that the numeral part of the variable name is the expected number of fields in the serialized version. If that's not the case, then can you elaborate on the naming convention?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

see comment on top

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

FooterSetting setting = new FooterSetting();
setting.setEnable(false);

String jsonTwo = mapper.writeValueAsString(setting);
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be jsonOne. This is assuming that the numeral part of the variable name is the expected number of fields in the serialized version. If that's not the case, then can you elaborate on the naming convention?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

see comment on top

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

BccSettings settings = new BccSettings();
settings.setEnable(false);

String jsonTwo = mapper.writeValueAsString(settings);
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be jsonOne. This is assuming that the numeral part of the variable name is the expected number of fields in the serialized version. If that's not the case, then can you elaborate on the naming convention?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

see comment on top

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@andy-trimble
Copy link
Contributor

LGTM

@dmitraver
Copy link
Contributor Author

@thinkingserious hi, how are we going to proceed with this one?

@thinkingserious
Copy link
Contributor

LGTM

Could you please resolve the merge conflict and I'll get this merged.

With Best Regards,

Elmer

@dmitraver
Copy link
Contributor Author

dmitraver commented Nov 1, 2017 via email

@thinkingserious thinkingserious merged commit 2110e54 into sendgrid:master Nov 1, 2017
@thinkingserious
Copy link
Contributor

Hello @dmitraver,

Thanks again for the PR!

It's HACKTOBERFEST! We want to show our appreciation by sending you some special Hacktoberfest swag. If you have not already, could you please fill out this form so we can send it to you? Thanks!

Team SendGrid DX

@monardo12
Copy link

Hi! I'm having the problem this issue is fixing with the Setting.java class, was it left out on purpose? Can this same fix be added to that class?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: medium fix is medium in difficulty status: code review request requesting a community code review or review from Twilio
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants