i got "[{"name":"Pune","placeType":{"code":7,"name":"Town"},"url":"http:\/\/where.yahooapis.com\/v1\/place\/2295412","parentid":23424848,"country":"India","woeid":2295412,"countryCode":"IN"}]" data from twitter api. now i have created cs class for the same,so how do i assign this data dynamically to my class fields ? <pre>dynamic serobj = JsonConvert.SerializeObject(obj); var objs = JsonConvert.DeserializeObject<Trendingcloset>(serobj);
public string name { get; set; } public string placeType { get; set; } public int code { get; set; } public string placename { get; set; } public string url { get; set; } public int parentid { get; set; } public string country { get; set; } public int woeid { get; set; } public string countryCode { get; set; }
List
var objs = JsonConvert.DeserializeObject<List<Trendingcloset>>(serobj);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)