So I've got a JSON string that I'm handling with json.net. I'm putting this into a dynamic object and then just accessing the values from that.
dynamic data = JObject.Parse(JsonString);
if(data !=null)
{
string names = data.names.all
int count = data.member_count;
}
The issue is if data doesn't contain member_count (or names.all) it doesn't throw an error it just stops dead (I assume it returns out). I've tried to search for a solution but I'm not even sure how to word it.