Skip to content

Commit

Permalink
Samples: Refactors typeof(T) to input.GetType() on CosmosSystemTextJs…
Browse files Browse the repository at this point in the history
…onSerializer (#3452)

Co-authored-by: Nalu Tripician <ntripician@microsoft.com>
  • Loading branch information
NaluTripician and NaluTripician authored Sep 12, 2022
1 parent fbb3210 commit 36ee222
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public override T FromStream<T>(Stream stream)
public override Stream ToStream<T>(T input)
{
MemoryStream streamPayload = new MemoryStream();
this.systemTextJsonSerializer.Serialize(streamPayload, input, typeof(T), default);
this.systemTextJsonSerializer.Serialize(streamPayload, input, input.GetType(), default);
streamPayload.Position = 0;
return streamPayload;
}
Expand Down

0 comments on commit 36ee222

Please sign in to comment.