This is the JSON data that I have:
{"testId":1,"testName":"HTML","minScore":20,"score":40,"date&qu
- using Newtonsoft.Json.Linq;
- using System.Net;
void get_response()
{
WebClient wp = new WebClient();
string url="your json url";
var response=wp.DownloadString(url)
get_data(response)
}
void get_data(string response)
{
datagridview.Rows.clear();`enter code here`
JArray fetch= JArray.Parse(response);
if(fetch.Count()>0)
{
for(int i=0;datagridview.Rows.Count>i;i++)
{
int n=datagridview.Rows.Add();
datagridview.Rows[n].Cells[0].Value=fetch[i]["Json
ObjectName1"].ToString();
}
}
}