forked from bblanchon/ArduinoJson
Test that JsonArray can store integers
This commit is contained in:
@ -1,2 +1,14 @@
|
||||
#include "JsonArray.h"
|
||||
|
||||
#include "JsonValue.h"
|
||||
|
||||
JsonValue JsonArray::operator[](int index) const
|
||||
{
|
||||
for (JsonNodeIterator it = beginChildren(); it != endChildren(); ++it)
|
||||
{
|
||||
if (!index) return JsonValue(*it);
|
||||
index--;
|
||||
}
|
||||
|
||||
return JsonValue();
|
||||
}
|
Reference in New Issue
Block a user