I have a simple json string which contains a collection of objects
http://sandapps.com/InAppAds/ads.json.txt
When I call GetAsync to get the objects, the collection returns 1 element instead of 4 and it’s empty:
new JsonServiceClient ().GetAsync<List<CrossSell>> (url, Success, Failure);
My class is simple:
class CrossSell
{
public string ID { get; set; }
public string AppCategory { get; set; }
public string AppID { get; set; }
public string Name { get; set; }
public string ImageUrl { get; set; }
public string Copy { get; set; }
public string Device { get; set; }
public string Link { get; set; }
}
The JSON assumes a response DTO like:
and not a bare array as your C# example suggests: