Made JsonValue inherit from JsonObjectBase

This commit is contained in:
Benoît Blanchon
2014-07-16 13:41:00 +02:00
parent d189bd7140
commit 6a868e46bd
7 changed files with 61 additions and 73 deletions

View File

@ -16,8 +16,9 @@ namespace ArduinoJson
public:
JsonObjectBase()
{
makeInvalid();
: json(0), tokens(0)
{
}
bool success()
@ -28,15 +29,9 @@ namespace ArduinoJson
protected:
JsonObjectBase(char* json, jsmntok_t* tokens)
: json(json), tokens(tokens)
{
this->json = json;
this->tokens = tokens;
}
void makeInvalid()
{
json = 0;
tokens = 0;
}
static int getNestedTokenCount(jsmntok_t* token);