I'm using JSON.Net to try and deserialize some responses from facebook. Here's a snapshot of the data I'm reading in:
{
"data": [
{
"id": "123"
},
{
"id": "234"
}
],
"paging": {
"cursors": {
"before": "xxx",
"after": "xxx"
},
"next": "xxx"
}
}
classes:
class jsonDeserialize
{
public List<ListDetail> ListDetail { get; set; }
}
public class DataList
{
public string id { get; set; }
}
public class Paging
{
public List<string> cursors { get; set; }
public string next { get; set; }
}
public class Cursors
{
public string before { get; set; }
public string after { get; set; }
}
public class ListDetail
{
public List<Cursors> Cursors { get; set; }
public List<Paging> Articles { get; set; }
public List<DataList> DataList { get; set; }
}
I'm using this code to use the JSON.NET Deserialize function: for some reason, result return null, please help me :(
var result = JsonConvert.DeserializeObject<jsonDeserialize>(jsonString);