I need to serialize the Json to List of values and don't want to any dependant class(means get,set) because of dynamically change the Json keys and also increase the thousands of keys after execution (I have an external json file).
I searched lots of link but unable to solve the issue I got only converted dictionary type only. Sample json is below,
{"ALC":"FSC","AVS":"7","CAB":"M","CL":"W","CNF":"N","CNX":"N","DES":"DEL","DTE":"3","EDT":"29 Jun 2017 09:20","FBAG":"15 Kg","FBC":"W2IPO","FCUR":null,"FN":"9W 822","FQT":true,"FRI":"FSC0","FYT":"160","ITN":"0","JYT":"160","MCL":"0","OFF":0,"OFI":false,"OFR":null,"ORG":"MAA","PC":"9W","RBD":null,"RFN":"False","RTK":"TAX:1801ASPLIT2901ASPLIT1101ASPLITADT1ASPLIT","SDT":"29 Jun 2017 06:40","SGD":"Aircraft Type : 738\u000d\u000aJourney Time : 160\u000d\u000aStart Terminal : 1\u000d\u000aEndTerminal : 3\u000d\u000aBaggage : 15 Kg","SGR":"","STE":"1","STP":"0","TNF":false,"VIA":"","VIAITN":null}
I stuck in this issue for past one day.Pls anyone give the solutions.My code is below..
var json = File.ReadAllText(Server.MapPath("JSON/Flight_res.txt"));
JToken rss = JObject.Parse(json);
var items= rss.SelectToken("FL").ToString();
var jss = new JavaScriptSerializer();
dynamic listofobj = jss.Deserialize<dynamic>(items.ToString());