This is less of a REST API question as it is a "how to I consume returned REST API lists of data" in .NET. I can retrieve and view the return raw data (example: grade center columns as a list) but I cannot figure out how deserialze the information into a .NET generic collection or data table. Single row returns such as a course or a user isn't a problem by using (as example) JsonConvert.DeserializeObject(Of Course)(content).
Can someone provide a link or a snippet of how to deseralize a list using Newtonsoft.Json ?
Thank you.
I created a separate class for the list
class MembershipList
{
[JsonProperty("results")]
public List<Membership> results { get; set; }
[JsonProperty("paging")]
public Paging paging { get; set; }
}
then deserialized it thusly
MembershipList enrList = new MembershipList();
enrList = JsonConvert.DeserializeObject<MembershipList>(responseContent);
don't know if that is the best way or not but it worked for me