Splitted in several files

This commit is contained in:
Benoit Blanchon
2014-01-11 15:05:35 +01:00
parent 583589c05c
commit e924bef409
10 changed files with 325 additions and 259 deletions

45
JsonHashTable.h Normal file
View File

@ -0,0 +1,45 @@
/*
* malloc-free JSON parser for Arduino
* Benoit Blanchon 2014
* MIT License
*/
#ifndef __JSONHASHTABLE_H
#define __JSONHASHTABLE_H
#include "JsonObjectBase.h"
class JsonArray;
class JsonHashTable : public JsonObjectBase
{
friend class JsonParserBase;
public:
JsonHashTable()
{
}
char* getString(char* key)
{
jsmntok_t* token = getToken(key);
return token != 0 ? json + token->start : 0;
}
JsonArray getArray(char* key);
private:
JsonHashTable(char* json, jsmntok_t* tokens)
: JsonObjectBase(json, tokens)
{
}
jsmntok_t* getToken(char* key);
};
#endif