Skip to content

Commit

Permalink
Fix #794 by removing the length check because it's not always possibl…
Browse files Browse the repository at this point in the history
…e to determine this.
  • Loading branch information
rwasef1830 committed Jan 10, 2024
1 parent d26c398 commit 7bf4ff9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Flurl.Http/Configuration/DefaultJsonSerializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ public DefaultJsonSerializer(JsonSerializerOptions options = null) {
/// Deserializes the specified stream to an object of type T.
/// </summary>
/// <param name="stream">The stream to deserialize.</param>
public T Deserialize<T>(Stream stream) => stream.Length == 0 ? default : JsonSerializer.Deserialize<T>(stream, _options);
public T Deserialize<T>(Stream stream)
{
return JsonSerializer.Deserialize<T>(stream, _options);
}
}
}
}

0 comments on commit 7bf4ff9

Please sign in to comment.