We receive JSON data from Facebook Real Time subscription. The JSON itself contains property like "object":"page" and we need to access this property.
{
"entry":[
{
"changes":[ ],
"id":"1037501376337008",
"time":1465883784
}
],"object":"page"
}
We use dynamic object to parse the JSON but when we try to access the result.object, it is not allowed as object is the keyword in C#.
dynamic result = JsonConvert.DeserializeObject<dynamic>(jsonRealTimeNotification);
string objectType = result.object.ToString(); // This line does not build
We can replace the "object" by some text in the original JSON string and then parse but we are looking if there is a standard way to handle this