The object you return from DeserializeObject will be a JObject that has a property Count. This property tells you how many properties are on the object.
var output = JsonConvert.DeserializeObject<dynamic>("{ }");
if (((JObject)output).Count == 0)
{
}
This will not tell you that the dynamic object is empty, but it will tell you if the deserialized JSON object is empty.
source
share