I have got data downloaded from url it is as follows.
//[
{
"id": "2932675",
"t": "GNK",
"e": "LON",
"l": "915.00",
"l_fix": "915.00",
"l_cur": "GBX915.00",
"s": "0",
"ltt": "5:08PM GMT",
"lt": "Dec 11,
"5": 08PM
"GMT",
"
"lt_dts": "2015-12-11T17:08:26Z",
"c": "-7.50",
"c_fix": "-7.50",
"cp": "-0.81",
"cp_fix": "-0.81",
"ccol": "chr",
"pcls_fix": "922.5"
}
]
and want following variable t : GNK and l:915 from above string and done following
void method1()
{
string scrip = textBox1.Text;
string s;
WebClient wc = new WebClient();
string url = ("http://finance.google.com/finance/infoclient=ig&q=NSE:" + scrip);
s = wc.DownloadString(url);
textBox2.Text = s.Substring(58, 6);
textBox3.Text = s;
}
public class LatestPrice
{
public string id { get; set; }
public string Name { get; set; }
public string type { get; set; }
public string l { get; set; }
public string l_fix { get; set; }
public string l_cur { get; set; }
public string s { get; set; }
public string lt { get; set; }
public string lt_dts { get; set; }
public string c { get; set; }
public string c_fix { get; set; }
public string cp { get; set; }
public string cp_fix { get; set; }
public string ccol { get; set; }
public string pcls_fix { get; set; }
}
public string[][] convert_string()
{
string[][] stockprice = null;
string stockprice1 = null;
string getdownloadstr = getstring();
stockprice1 = getdownloadstr.Replace("//", "").Trim();
var v = JsonConvert.DeserializeObject<List<LatestPrice>>(stockprice1);
}
i have made changes to program -- but how to access the t : gnk value or l = 915 value