jsonnot getting items list in c# getting error

Jan 31 2018 11:33 PM
http://api.q-tickets.com/V5.0/getshowsdatesonlybymovieidjson?MovieId=23733
 
{"items": [{"id":"9","name":"Alkhor","arabicname":"?????","logo":"http://q-tickets.com/images/Alkhor.png","address":"Alkhor","show_dates" : "02/02/2018,02/03/2018,02/04/2018,02/05/2018,02/06/2018,02/07/2018,02/02/2018"},{"id":"7","name":"Asian Town","arabicname":"??????? ????????","logo":"http://q-tickets.com/images/ATown.png","address":"Industrial Area","show_dates" : "02/03/2018,02/04/2018,02/05/2018,02/06/2018,02/07/2018,02/02/2018"},{"id":"1","name":"City Center","arabicname":"???? ????","logo":"http://q-tickets.com/images/city-centre-logo.png","address":"Westbay","show_dates" : "02/03/2018,02/04/2018,02/05/2018,02/06/2018,02/07/2018,02/02/2018"},{"id":"11","name":"Roxy","arabicname":"????? ???????","logo":"http://q-tickets.com/images/Roxy.png","address":"BSquare Mall","show_dates" : "02/03/2018,02/04/2018,02/05/2018,02/06/2018"}]}
 
my model
 
public class Itemin
{
public string id { get; set; }
public string name { get; set; }
public string arabicname { get; set; }
public string logo { get; set; }
public string address { get; set; }
public string show_dates { get; set; }
}
public class RootObjectitems
{
[JsonProperty(PropertyName = "Item")]
public List<Itemin> items { get; set; }
}
contoller:
.....................
var requesti = (HttpWebRequest)WebRequest.Create("http://api.q-tickets.com/V5.0/getshowsdatesbymovieidjson?MovieId="+id);
// http://api.q-tickets.com/V5.0/getshowsdatesbymovieidjson?MovieId=23733
requesti.Method = "POST";
string getDatai = "sdfsdf";
byte[] byteArrayi = Encoding.UTF8.GetBytes(getDatai);
requesti.ContentType = "application/json";
requesti.ContentLength = byteArrayi.Length;
Stream dataStreami = requesti.GetRequestStream();
dataStreami.Write(byteArrayi, 0, byteArrayi.Length);
dataStreami.Close();
WebResponse responsesi = requesti.GetResponse();
dataStreami = responsesi.GetResponseStream();
StreamReader readeri = new StreamReader(dataStreami);
var responseFromServeri = readeri.ReadToEnd();
var resulti = responseFromServeri;
RootObjectitems obsasdjs = JsonConvert.DeserializeObject<RootObjectitems>(resulti).items;
IEnumerable<RootObjectitems> jsonresultds = JsonConvert.DeserializeObject<IEnumerable<RootObjectitems>>(resulti);
var objs = JsonConvert.DeserializeObject<List<RootObjectitems>>(resulti);

Answers (17)