I am getting some data from Gov tracker (http://www.govtrack.us/developers/api) and creating a Windows 8 Store application..
I started out trying to use the HttpClient to get the JSON and then use Json2Charp.com to convert it to classes... But then I had no idea what to do with this giant class and the line
var contacts = JsonArray.Parse(data);
would not work..
So now I requested it as XML and I am using XML to LINQ to slowly get what I need ..for example..
var things = from x in xdoc.Descendants("person")
select new Person
{
firstname = x.Element("firstname").Value
};
But in this case and in general what is the easiest way? Is it using XML for this windows 8 application and using JSON to javascript applications? (since I always hear about how JSON fits so well with javascript)
At the moment since I could not get the JSON deserialization to work I guess XML is easier in this case?