Hi All,
let suppose i have json file like this
{
"url": "http://google.com",
"Viewmodel": {
"recipientId": 0,
"firstName": null,
"lastName": null
}
}
but above json structure changing every time so i can not create class
so for i have tried bellow
//get the Json filepath
string file = Server.MapPath("~/App_Data/output.json");
//deserialize JSON from file
string stringobj = System.IO.File.ReadAllText(file);
JavaScriptSerializer ser = new JavaScriptSerializer();
Object o= ser.Deserialize
foreach (var item in o)
{
// print the property but how ?
// print the value but how?
}

Bikesh SrivastavaPosted Dec 13, 2016, 12:50 PM
Amit GuptaPosted Dec 13, 2016, 9:57 AM
Amit GuptaPosted Dec 13, 2016, 9:52 AM