Files
ArduinoJson/JsonParser/JsonHashTable.h

42 lines
917 B
C
Raw Permalink 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"
2014-07-03 14:00:51 +02:00
namespace ArduinoJson
2014-01-11 15:05:35 +01:00
{
2014-07-03 14:00:51 +02:00
namespace Parser
{
class JsonArray;
class JsonHashTable : public JsonObjectBase
{
template <int N>
friend class JsonParser;
2014-01-11 22:55:00 +01:00
2014-07-03 14:00:51 +02:00
friend class JsonArray;
2014-01-11 15:05:35 +01:00
2014-07-03 14:00:51 +02:00
public:
2014-01-11 15:05:35 +01:00
2014-07-03 14:00:51 +02:00
JsonHashTable() {}
2014-01-11 15:05:35 +01:00
2014-07-03 14:00:51 +02:00
bool containsKey(const char* key);
2014-01-13 19:46:53 +01:00
2014-07-03 14:00:51 +02: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
2014-07-03 14:00:51 +02:00
private:
2014-01-11 15:05:35 +01:00
2014-07-03 14:00:51 +02:00
JsonHashTable(char* json, jsmntok_t* tokens);
jsmntok_t* getToken(const char* key);
};
}
}