mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-20 14:02:24 +02:00
Made JsonValue inherit from JsonObjectBase
This commit is contained in:
@ -25,9 +25,14 @@ namespace ArduinoJson
|
||||
|
||||
JsonArray() {}
|
||||
|
||||
bool success()
|
||||
{
|
||||
return JsonObjectBase::success() && tokens->type == JSMN_ARRAY;
|
||||
}
|
||||
|
||||
int getLength()
|
||||
{
|
||||
return tokens != 0 ? tokens[0].size : 0;
|
||||
return success() ? tokens[0].size : 0;
|
||||
}
|
||||
|
||||
JsonValue operator[](int index);
|
||||
@ -61,7 +66,11 @@ namespace ArduinoJson
|
||||
|
||||
private:
|
||||
|
||||
JsonArray(char* json, jsmntok_t* tokens);
|
||||
JsonArray(char* json, jsmntok_t* tokens)
|
||||
: JsonObjectBase(json, tokens)
|
||||
{
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user