Write a class and code like this...
public class NSEInstrument
{
[JsonProperty("token")]
public string token { get; set; }
[JsonProperty("symbol")]
public string symbol { get; set; }
[JsonProperty("name")]
public string name { get; set; }
}
public List<NSEInstrument> GetNSEInstruments()
{
WebRequest webRequest = WebRequest.Create("https://margincalculator.angelbroking.com/OpenAPI_File/files/OpenAPIScripMaster.json");
HttpWebResponse response = (HttpWebResponse)webRequest.GetResponse();
if (response.StatusDescription == "OK")
{
Stream dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
List<NSEInstrument> data = JsonConvert.DeserializeObject<List<NSEInstrument>>(responseFromServer);
return data;
}
return null;
}