please help this one not able to get full json data

Dec 26 2017 8:35 AM
=>by using of this link (https://codebeautify.org/xmltojson ) i am passing bellow url i ma getting proper json data but c# some data is missing plz help me 
 
 
var requests = (HttpWebRequest)WebRequest.Create("http://api.q-tickets.com/V5.0/getshowstheatersbymovieidjson?MovieId=23589);
requests.Method = "POST";
string postData = "This is a test that posts this string to a Web server.";
byte[] byteArrays = Encoding.UTF8.GetBytes(postData);
requests.ContentType = "application/x-www-form-urlencoded";
requests.ContentLength = byteArrays.Length;
Stream dataStreams = requests.GetRequestStream();
dataStreams.Write(byteArrays, 0, byteArrays.Length);
dataStreams.Close();
WebResponse response = requests.GetResponse();
Console.WriteLine(((HttpWebResponse)response).StatusDescription);
dataStreams = response.GetResponseStream();
StreamReader readers = new StreamReader(dataStreams);
var responseFromServers = readers.ReadToEnd();
var results = responseFromServers;
XmlDocument doc = new XmlDocument();
doc.LoadXml(results);
string json = Newtonsoft.Json.JsonConvert.SerializeXmlNode(doc);
var obj = Newtonsoft.Json.JsonConvert.DeserializeObject(json);
 
 (here obj i am getting values but some key values are null)
 
//////////////////now i will give classess////////////// 
 
public class ShowTime
{
public string _id { get; set; }
public string _time { get; set; }
public string _avaliable { get; set; }
public string _total { get; set; }
public string _type { get; set; }
public string _enable { get; set; }
public string _screenId { get; set; }
public string _screenName { get; set; }
public string _screeentype { get; set; }
}
public class ShowTimes
{
public List showTime { get; set; }
}
public class ShowDate
{
public ShowTimes ShowTimes { get; set; }
public string _id { get; set; }
public string _Date { get; set; }
}
public class ShowDates
{
public List showDate { get; set; }
}
public class Theatre
{
public ShowDates ShowDates { get; set; }
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 class Moviesinfo
{
public List Theatre { get; set; }
public string _id { get; set; }
public string _name { get; set; }
public string _rdate { get; set; }
public string _thumbURL { get; set; }
public string _thumbnail { get; set; }
public string _banner { get; set; }
public string _ipadthumb { get; set; }
public string _iphonethumb { get; set; }
public string _Languageid { get; set; }
public string _Censor { get; set; }
public string _IMDB_rating { get; set; }
public string _Duration { get; set; }
public string _Description { get; set; }
public string _CastAndCrew { get; set; }
public string _MovieType { get; set; }
public string _TrailerURL { get; set; }
public string _Movieurl { get; set; }
public string _colorcode { get; set; }
public string _bgcolorcode { get; set; }
public string _bgbordercolorcode { get; set; }
public string _btncolorcode { get; set; }
public string _titlecolorcode { get; set; }
public string _AgeRestrictRating { get; set; }
}
public class Moviesin
{
public Moviesinfo movie { get; set; }
}
public class Response
{
public Moviesin Movies { get; set; }
public string _status { get; set; }
public string _LastModified { get; set; }
}
public class RootObjectinfo
{
public Response response { get; set; }
}

Answers (3)