forked from bblanchon/ArduinoJson
Added namespace for the parser
This commit is contained in:
1 parent
78a920a5fc
commit
50b2a1b4a7
12 files changed
+156
-122
No files matched your search
+28
-22
@@ -7,33 +7,39 @@
|
||||
|
||||
#include "JsonObjectBase.h"
|
||||
|
||||
class JsonHashTable;
|
||||
|
||||
class JsonArray : public JsonObjectBase
|
||||
namespace ArduinoJson
|
||||
{
|
||||
template <int N>
|
||||
friend class JsonParser;
|
||||
namespace Parser
|
||||
{
|
||||
class JsonHashTable;
|
||||
|
||||
friend class JsonHashTable;
|
||||
class JsonArray : public JsonObjectBase
|
||||
{
|
||||
template <int N>
|
||||
friend class JsonParser;
|
||||
|
||||
public:
|
||||
friend class JsonHashTable;
|
||||
|
||||
JsonArray() {}
|
||||
public:
|
||||
|
||||
int getLength()
|
||||
{
|
||||
return tokens != 0 ? tokens[0].size : 0;
|
||||
}
|
||||
JsonArray() {}
|
||||
|
||||
JsonArray getArray(int index);
|
||||
bool getBool(int index);
|
||||
double getDouble(int index);
|
||||
JsonHashTable getHashTable(int index);
|
||||
long getLong(int index);
|
||||
char* getString(int index);
|
||||
int getLength()
|
||||
{
|
||||
return tokens != 0 ? tokens[0].size : 0;
|
||||
}
|
||||
|
||||
private:
|
||||
JsonArray getArray(int index);
|
||||
bool getBool(int index);
|
||||
double getDouble(int index);
|
||||
JsonHashTable getHashTable(int index);
|
||||
long getLong(int index);
|
||||
char* getString(int index);
|
||||
|
||||
JsonArray(char* json, jsmntok_t* tokens);
|
||||
jsmntok_t* getToken(int index);
|
||||
};
|
||||
private:
|
||||
|
||||
JsonArray(char* json, jsmntok_t* tokens);
|
||||
jsmntok_t* getToken(int index);
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user