using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Net.Http; using System.Text; using System.Threading.Tasks; namespace Knoks.Core.Exchanges { public static class HttpExtensions { public static async Task ReadAsJsonAsync(this HttpContent content) { string json = await content.ReadAsStringAsync(); T value = JsonConvert.DeserializeObject(json); return value; } } }