I will try to parse the string of JSON but there is a problem to parse 'long' character in JSON string.
JSON code is below
{ "valid": 1, "delta": 0, "time": 23755, "date": 200815, "fix": 2, "status": 1, "sats": 12, "lat": 37529922, "long": 126898053, "speed": 874, "heading": 0, "alt": 171300 }
I want to get lat and long value but I can't get value because Long character is keyword
My code is below
using (WebClient wc = new WebClient())
{
string json = wc.DownloadString(sb.ToString());
dynamic temp = JsonConvert.DeserializeObject(json);
Gps = new GpsInfo();
Gps.latY = temp.lat;
Gps.lonX = temp.long; //Error long type is keyword
SettingGpsChart(Gps);
}
How can I parse json value long and lat?