Код: Выделить всё
{
"translation": {
"el": {
"name": "Greek",
"nativeName": "Ελληνικά",
"dir": "ltr"
},
"en": {
"name": "English",
"nativeName": "English",
"dir": "ltr"
}
}
}
Код: Выделить всё
// Root myDeserializedClass = JsonConvert.DeserializeObject(myJsonResponse);
public class El
{
public string name { get; set; }
public string nativeName { get; set; }
public string dir { get; set; }
}
public class En
{
public string name { get; set; }
public string nativeName { get; set; }
public string dir { get; set; }
}
public class Root
{
public Translation translation { get; set; }
}
public class Translation
{
public El el { get; set; }
public En en { get; set; }
}
Код: Выделить всё
public class LanguageInfo{
public string LanguageId {get; set;}
public string Name {get;set;}
public string NativeName {get;set;}
public string Direction {get;set;}
}
Подробнее здесь: https://stackoverflow.com/questions/793 ... ies-withou
Мобильная версия