public static CovidData sendItemData() { const string Url = "https://api.covid19api.com/summary"; string json = downloadJsonString(Url); CovidData item = JsonConvert.DeserializeObject <CovidData>(json); return(item); }
public MainWindow() { InitializeComponent(); rowGrid = new List <GridCustomRow>(); rowGrid.Clear(); covidData = new CovidData(); covidData = JsonOperation.sendItemData(); var item = from u in covidData.Countries orderby u.TotalConfirmed descending select u; updateGrid(item.ToList()); updateHeader(covidData.Global); }