Added JsonHashTable::containsKey()

This commit is contained in:
Benoit Blanchon
2014-01-13 19:46:53 +01:00
parent 9f4eb42cd6
commit 319600d51c
2 changed files with 7 additions and 0 deletions

View File

@ -48,6 +48,11 @@ jsmntok_t* JsonHashTable::getToken(char* desiredKey)
return 0;
}
bool JsonHashTable::containsKey(char* key)
{
return getToken(key) != 0;
}
JsonArray JsonHashTable::getArray(char* key)
{
return JsonArray(json, getToken(key));

View File

@ -21,6 +21,8 @@ public:
JsonHashTable() {}
bool containsKey(char* key);
JsonArray getArray(char* key);
bool getBool(char* key);
double getDouble(char* key);