i am new in asp.net developpement and i don't know how to obtain json data with multi array and convert it in 3 model ? example: - array 1 ln, array2 wn and array 3 mangas -model 1 ln , model 2 wn, model 3 manga
{
"LN": [
{
"Name": "Mahouka Koukou no Rettousei",
"Authors": "Satou Tsutomu",
"Artits": "Ishida Kana",
"Year": "2011",
"Volume": 29,
}
],
"WN": [
{
"Name": "Chiyu Mahou no Machigatta Tsukaikata ~Senjou wo Kakeru Kaifuku Youin~",
"Authors": "Kurokata, くろかた",
"Artits": "KeG",
"Year": "2014",
"Chapter": 236,
}
],
"Manga": [
{
"Name": "Tensei Shitara Slime Datta Ken",
"Authors": "Fuse",
"Artits": "Kawakami Taiki",
"Year": "2015",
"Chapter": 60,
}
]
}
public class LN
{
public string Name { get; set; }
public string Authors { get; set; }
public string Artits { get; set; }
public string Year { get; set; }
public int Volume { get; set; }
}
public class WN
{
public string Name { get; set; }
public string Authors { get; set; }
public string Artits { get; set; }
public string Year { get; set; }
public int Chapter { get; set; }
}
public class Manga
{
public string Name { get; set; }
public string Authors { get; set; }
public string Artits { get; set; }
public string Year { get; set; }
public int Chapter { get; set; }
}
I obtain this in jsonutils
public class LN
{
public string Name { get; set; }
public string Authors { get; set; }
public string Artits { get; set; }
public string Year { get; set; }
public int Volume { get; set; }
}
public class WN
{
public string Name { get; set; }
public string Authors { get; set; }
public string Artits { get; set; }
public string Year { get; set; }
public int Chapter { get; set; }
}
public class Manga
{
public string Name { get; set; }
public string Authors { get; set; }
public string Artits { get; set; }
public string Year { get; set; }
public int Chapter { get; set; }
}
public class Example
{
public IList<LN> LN { get; set; }
public IList<WN> WN { get; set; }
public IList<Manga> Manga { get; set; }
}
obtain 3 list: mangas, ln,wn and use this list in the view via the controller. but i don't know how to choose the array in json.