KiotaJsonSerialization.serializeAsString should have some mechanism to override backing store functionality #1417
Labels
enhancement
New feature or request
type:enhancement
Enhancement request targeting an existing experience
Copied from microsoftgraph/msgraph-sdk-java#2064. There should be some mechanism in
KiotaJsonSerialization.serializeAsString
to override backing store so that all fields get serialized without requiring a developer to manually muck with the backing store.Describe the bug
This results in
subscriptionJson
being{}
. This was originally reported in #1879.The suggested fix to call
subscription.getBackingStore().setReturnOnlyChangedValues(false);
did not change the result. It should be noted thatsubscription.getBackingStore().getReturnOnlyChangedValues();
returned false before this anyway. On a whim, I tried callingsubscription.getBackingStore().setReturnOnlyChangedValues(true);
before serializing, and I got a partial result:Expected behavior
subscriptionJson
should be a full JSON representation of the subscription object returned by the service.How to reproduce
Code above.
Graph SDK Version
6.13.0
Latest version known to work for scenario above?
No response
Known Workarounds
This works but is way less convenient than using the static methods. It also requires an explicit reference to microsoft-kiota-serialization-json in your dependencies, which I suspect can cause problems down the line as the SDK bumps its versions.
The text was updated successfully, but these errors were encountered: