Skip to content

Commit

Permalink
Merge pull request #32 from VelvetToroyashi/patch-1
Browse files Browse the repository at this point in the history
Fix .ToObject<T> throwing due to writer cache
  • Loading branch information
Nihlus authored Sep 4, 2024
2 parents 799baf1 + 42b15c3 commit 75844c3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Remora.Rest/Extensions/JsonExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ public static class JsonExtensions
using var writer = new Utf8JsonWriter(bufferWriter);
element.WriteTo(writer);

writer.Flush();

return JsonSerializer.Deserialize<TEntity>(bufferWriter.WrittenSpan, options);
}

Expand Down

0 comments on commit 75844c3

Please sign in to comment.