Skip to content

Instantly share code, notes, and snippets.

@jaredjenkins
Forked from sinergy/new_gist_file
Created August 9, 2013 23:21
Show Gist options
  • Save jaredjenkins/6198133 to your computer and use it in GitHub Desktop.
Save jaredjenkins/6198133 to your computer and use it in GitHub Desktop.
static public bool JsonDataContainsKey(JsonData data,string key)
{
bool result = false;
if(data == null)
return result;
if(!data.IsObject)
{
return result;
}
IDictionary tdictionary = data as IDictionary;
if(tdictionary == null)
return result;
if(tdictionary.Contains(key))
{
result = true;
}
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment