-
Notifications
You must be signed in to change notification settings - Fork 28
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
Serialization methods overloads to disable the "only changed properties behaviour" #1131
Comments
Just so I understand. When serializing models (across languages) we only serialize what has changed when the backing store is enabled, right? If this is the case, I agree we should have options to "deep" serialize vs only what is in the backing store. If it's the case without the backing store, then I think this is a bug, though... |
this is only present with the backing store. And we don't want to give people the option, but rather have a consistent behaviour. |
Just to make it clear, can you provide a tiny example of before / after of a collection that needs to be serialized? |
fixing the broken serialization of collectionsvar joeUser = client.users.byId("[email protected]").get();
var userResponse = client.users.get();
userResponse.SetValue(new User[] { joeUser });
KiotaJsonSerialization.serializeAsString(userReponse); results in {
"value": []
} when it should result in {
"value": [{"displayName": "Joe Smith", "email": "[email protected]"}]
} (that illustrates the broken part) Option to serialize everything when things didn't changevar userResponse = client.users.get();
KiotaJsonSerialization.serializeAsString(userReponse); results in {} when it should result in {
"value": [{"displayName": "Joe Smith", "email": "[email protected]"}]
} |
For everyone's context, we recently went through this in dotnet and should replicate the changes here. |
We recently got very similar questions:
microsoftgraph/msgraph-sdk-java#1886
microsoftgraph/msgraph-sdk-java#1879
People generally want to:
While our serialization helpers are helpful, they fall short of one aspect: they don't allow the caller to specify "serialize everything" (as opposed to serializing only the changed properties).
My suggestion here is to:
@sebastienlevert to provide input on this one before we start any work, and if we get an agreement here, I'll replicate the issue to the other repos.
The text was updated successfully, but these errors were encountered: