Added namespace for the parser

This commit is contained in:
Benoît Blanchon
2014-07-03 14:00:51 +02:00
parent 78a920a5fc
commit 50b2a1b4a7
12 changed files with 156 additions and 122 deletions

View File

@ -7,30 +7,36 @@
#include "JsonObjectBase.h"
class JsonArray;
class JsonHashTable : public JsonObjectBase
namespace ArduinoJson
{
template <int N>
friend class JsonParser;
namespace Parser
{
class JsonArray;
friend class JsonArray;
class JsonHashTable : public JsonObjectBase
{
template <int N>
friend class JsonParser;
public:
friend class JsonArray;
JsonHashTable() {}
public:
bool containsKey(const char* key);
JsonHashTable() {}
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);
bool containsKey(const char* key);
private:
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);
JsonHashTable(char* json, jsmntok_t* tokens);
jsmntok_t* getToken(const char* key);
};
private:
JsonHashTable(char* json, jsmntok_t* tokens);
jsmntok_t* getToken(const char* key);
};
}
}