Fixed bug in JsonArray::begin() and end()

This commit is contained in:
Benoit Blanchon
2014-07-19 14:55:16 +02:00
parent 0fe77176e1
commit cd7a7b1533
4 changed files with 23 additions and 8 deletions

View File

@ -35,19 +35,19 @@ namespace ArduinoJson
int size()
{
return isArray() ? JsonToken::size() : 0;
return isArray() ? childrenCount() : 0;
}
JsonValue operator[](int index);
JsonArrayIterator begin()
{
return firstChild();
return isArray() ? firstChild() : null();
}
JsonArrayIterator end()
{
return nextSibling();
return isArray() ? nextSibling() : null();
}
DEPRECATED int getLength()