diff options
| author | LogicalPhallacy <44458166+LogicalPhallacy@users.noreply.github.com> | 2019-01-05 16:22:18 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-05 16:22:18 -0800 |
| commit | 8ff89fdc0c30f595a171ffc550f907ef22b6212a (patch) | |
| tree | 6bae45c12ea8530e5af2ceaceaa50e715ea7087c /Emby.Server.Implementations/Serialization | |
| parent | 4eaeee7be24a35e697731da1403c12df8f4f753a (diff) | |
| parent | b39585cbf6ccc519161e8f6420daaa046a26bf32 (diff) | |
Merge pull request #5 from jellyfin/dev
Dev
Diffstat (limited to 'Emby.Server.Implementations/Serialization')
| -rw-r--r-- | Emby.Server.Implementations/Serialization/JsonSerializer.cs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Emby.Server.Implementations/Serialization/JsonSerializer.cs b/Emby.Server.Implementations/Serialization/JsonSerializer.cs index 423fe7b18..e28acd769 100644 --- a/Emby.Server.Implementations/Serialization/JsonSerializer.cs +++ b/Emby.Server.Implementations/Serialization/JsonSerializer.cs @@ -136,19 +136,15 @@ namespace Emby.Common.Implementations.Serialization return ServiceStack.Text.JsonSerializer.DeserializeFromStream<T>(stream); } - public async Task<T> DeserializeFromStreamAsync<T>(Stream stream) + public Task<T> DeserializeFromStreamAsync<T>(Stream stream) { if (stream == null) { throw new ArgumentNullException("stream"); } - using (var reader = new StreamReader(stream)) - { - var json = await reader.ReadToEndAsync().ConfigureAwait(false); - return ServiceStack.Text.JsonSerializer.DeserializeFromString<T>(json); - } + return ServiceStack.Text.JsonSerializer.DeserializeFromStreamAsync<T>(stream); } /// <summary> |
