Как назначить данные формата Twitter api json полям моего класса В C# ?
я застрял здесь ,Пожалуйста, помогите мне выбраться
Что я уже пробовал:
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; }