Closed mbursill closed 1 month ago
Hi @mbursill Thanks for using kiota and for reaching out.
Can you make the following change:
-jsonSerializationWriter.writeObjectValue(
- undefined,
- updateWidgetRequest,
- serializeUpdateWidgetRequest
-);
+serializeUpdateWidgetRequest(jsonSerializationWriter, updateWidgetRequest);
And see whether that solves your issue?
The output in this case would be:
,"name":"Sproket","size":5,
It's worth noting that the issue happens when making an endpoint call that sends the root object. If I capture the traffic it looks like this:
The schema: swagger.json
It was tested on Kiota 1.13, 1.14 and the latest preview.
Thanks for the additional information. Are you generating with or without the backing store? Seems related to #1190
closing as duplicate of #1190
When serializing an object that has a nested object, and setting the nested object to undefined, we're getting an extra comma in the serialized output:
The logged json will have:
{,"name":"Sproket","size":5}
The
serializeUpdateWidgetRequest
function is from the generated code.