I'm having some issues with fetching json values in c#.
https://i.sstatic.net/Uxn8e.png
Here is the code in question:
var json2 = new WebClient().DownloadString("http://fetch.json.url.here" + Input_Textbox.Text);
JObject o2 = JObject.Parse(json2);
string he_ident = (string)o2["he_ident"];
string le_ident = (string)o2["le_ident"];
Console.WriteLine(he_ident);
Console.WriteLine(le_ident);
Line 204 is: JObject o2 = JObject.Parse(json2);
The json is this: [{"le_ident":"06L","he_ident":"24R"},{"le_ident":"06R","he_ident":"24L"},{"le_ident":"07L","he_ident":"25R"},{"le_ident":"07R","he_ident":"25L"}]
I've also tried with just one set of le_ident and he_ident, such as [{"le_ident":"06L","he_ident":"24R"}] but it sill throws the same error.
Any ideas?
JsonConvert.Deserialize()in an alternative solution?