Open inserve-paul opened 8 months ago
Closed, as I'm using the SerializationWriter to get the result. However it feels a bit overcomplicated to serialize the models.
Thanks for the feedback. Re-opening this to track possible improvements.
@Ndiritu Currently I'm using the following approach to serialize the models, which is not ideal but ok for now.
Microsoft\Kiota\Abstractions\Serialization\Parsable $parsable;
$writer = $this
->graphClient
->getRequestAdapter()
->getSerializationWriterFactory()
->getSerializationWriter('application/json')
;
$parsable->serialize($writer);
$json = sprintf('{%s}', $writer->getSerializedContent()->getContents());
Hi,
I've been implementing the v2.2 version of the msgraph-sdk this week; however I'm facing an issue. How can I encode the models returned from the client to JSON so it contains all values? It seems the actual values are in the BackingStore, but how can I make sure I get the actual data to be passed in a response?
For e.g. this works; but doesn't feel as the right solution:
json_encode($event->getBackingStore()->enumerate());
For reference, this is my code example below;
Thank you in advance