JSON. Вложенные фигурные скобки (без квадратных) - C#
Формулировка задачи:
{
"id":1234,
"nickname":"user_nickname",
"avatar":"http://dere.shikimori.org/images/user/x48/4114.png?1378670719",
"image":
{
"x160":"http://dere.shikimori.org/images/user/x160/4114.png?1378670719",
"x148":"http://dere.shikimori.org/images/user/x148/4114.png?1378670719",
"x80":"http://dere.shikimori.org/images/user/x80/4114.png?1378670719",
"x64":"http://dere.shikimori.org/images/user/x64/4114.png?1378670719",
"x48":"http://dere.shikimori.org/images/user/x48/4114.png?1378670719",
"x32":"http://dere.shikimori.org/images/user/x32/4114.png?1378670719",
"x16":"http://dere.shikimori.org/images/user/x16/4114.png?1378670719"
},
"last_online_at":"2015-06-21T21:31:45.567+03:00",
"name":"Имя Фамилия",
"sex":"male",
"website":"http://www.vk.com/id0",
"birth_on":"1900-01-01"
} public class WhoAmI
{
public string id { get; set; }
public string nickname { get; set; }
public string avatar { get; set; }
public string image { get; set; }
public string last_online_at { get; set; }
public string name { get; set; }
public string sex { get; set; }
public string website { get; set; }
public string birth_on { get; set; }
}Решение задачи: «JSON. Вложенные фигурные скобки (без квадратных)»
textual
Листинг программы
public class WhoAmI
{
public string id { get; set; }
public string nickname { get; set; }
public string avatar { get; set; }
Image image {get; set;}
public string last_online_at { get; set; }
public string name { get; set; }
public string sex { get; set; }
public string website { get; set; }
public string birth_on { get; set; }
}
public class Image
{
public string x160 { get; set; }
public string x148 { get; set; }
public string x80 { get; set; }
public string x64 { get; set; }
public string x48 { get; set; }
public string x32 { get; set; }
public string x16 { get; set; }
}