diff --git a/Remora.Rest/Extensions/JsonExtensions.cs b/Remora.Rest/Extensions/JsonExtensions.cs index df260cf..20fa74b 100644 --- a/Remora.Rest/Extensions/JsonExtensions.cs +++ b/Remora.Rest/Extensions/JsonExtensions.cs @@ -34,6 +34,8 @@ public static class JsonExtensions using var writer = new Utf8JsonWriter(bufferWriter); element.WriteTo(writer); + writer.Flush(); + return JsonSerializer.Deserialize(bufferWriter.WrittenSpan, options); }