Files
ArduinoJson/JsonParser/JsonHashTable.h

36 lines
661 B
C
Raw Normal View History

2014-07-03 13:58:08 +02:00
/*
* Arduino JSON library
* Benoit Blanchon 2014 - MIT License
*/
2014-01-11 15:05:35 +01:00
2014-07-03 13:58:08 +02:00
#pragma once
2014-01-11 15:05:35 +01:00
#include "JsonObjectBase.h"
class JsonArray;
class JsonHashTable : public JsonObjectBase
{
2014-01-11 22:55:00 +01:00
template <int N>
friend class JsonParser;
2014-01-11 15:11:23 +01:00
friend class JsonArray;
2014-01-11 15:05:35 +01:00
public:
2014-01-11 15:11:23 +01:00
JsonHashTable() {}
2014-01-11 15:05:35 +01:00
bool containsKey(const char* key);
2014-01-13 19:46:53 +01:00
JsonArray getArray(const char* key);
bool getBool(const char* key);
double getDouble(const char* key);
JsonHashTable getHashTable(const char* key);
long getLong(const char* key);
char* getString(const char* key);
2014-01-11 15:05:35 +01:00
private:
JsonHashTable(char* json, jsmntok_t* tokens);
jsmntok_t* getToken(const char* key);
2014-07-03 13:58:08 +02:00
};