I want trying to deserialize the following Facebook post response:
"data": [
{
"id": "...",
"from": {
"category": "Local business",
"name": "...",
"id": "..."
},
"message": "...",
"picture": "...",
"likes": {
"data": [
{
"id": "...",
"name": "..."
},
{
"id": "...",
"name": "..."
]
}
}
]
Post model class is:
public class Post
{
public string Id { get; set; }
public From From { get; set; }
public string Message { get; set; }
public string Picture { get; set; }
[JsonProperty("likes.data")] <===== why this is not working??
public List<Like> Likes { get; set; }
}
Like model class
public class Like
{
public string Id { get; set; }
public string Name { get; set; }
}
While deserializing the json i want to map likes.data entries to Likes list. How can I do this??