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

Allow backing store serialization configuration in serialization helpers #1608

Merged
merged 12 commits into from
Oct 8, 2024

Conversation

Ndiritu
Copy link
Contributor

@Ndiritu Ndiritu commented Oct 4, 2024

closes #1131

Allows overriding default backing store behaviour while serializing.

  • Retains previous serialization helper method implementation with the default behaviour of returning only changed values (true). To prevent backward incompatibility.

Usage

Before:

// BackedModel model = kiotaClient...get();
String result = KiotaJsonSerialization.serializeAsString(model); // returns empty string since no property has changed.

Now:

// User model = kiotaClient...get();
String result = KiotaJsonSerialization.serializeAsString(model, false); // returns serialized string by disabling returnOnlyChangedValues

@Ndiritu Ndiritu changed the title Allow backing store configuration via serialization helpers Allow backing store serialization configuration in serialization helpers Oct 4, 2024
@Ndiritu Ndiritu marked this pull request as ready for review October 4, 2024 15:12
@Ndiritu Ndiritu requested a review from a team as a code owner October 4, 2024 15:12
@Ndiritu Ndiritu self-assigned this Oct 4, 2024
Copy link

sonarcloud bot commented Oct 7, 2024

Copy link
Member

@baywet baywet left a comment

Choose a reason for hiding this comment

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

Thank you for making the changes!

@Ndiritu Ndiritu merged commit d15e201 into main Oct 8, 2024
9 checks passed
@Ndiritu Ndiritu deleted the fix/serialization-helper-backing-store branch October 8, 2024 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Serialization methods overloads to disable the "only changed properties behaviour"
3 participants