I am calling the CodeCollaborator API using Json.Net from a C# program.
I am receiving the following JSON in an HttpResponse from the API.
[{"result":{"loginTicket":"c9c6793926517db05bde47d3dd50026e"}}]
How can I parse it to create the LoginTicketResponse object mentioned below?
public class LoginTicketResponse
{
public string loginTicket { get; set; }
}
I tried the following code but no luck.
JArray a = JArray.Parse(result);
foreach (JObject o in a.Children<JObject>())
{
foreach (JProperty p in o.Properties())
{
dynamic stuff = JsonConvert.DeserializeObject(p.ToString());
}
}