| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- /*
- * Arduino JSON library
- * Benoit Blanchon 2014 - MIT License
- */
- #pragma once
- #include "JsonValue.h"
- #include "JsonArrayIterator.h"
- namespace ArduinoJson
- {
- namespace Parser
- {
- class JsonObject;
-
- class JsonArray : JsonValue
- {
- public:
- JsonArray()
- {
- }
- JsonArray(JsonValue value)
- : JsonValue(value)
- {
- }
- bool success()
- {
- return isArray();
- }
- JsonValue operator[](int index)
- {
- return JsonValue::operator[](index);
- }
- int size()
- {
- return isArray() ? childrenCount() : 0;
- }
- JsonArrayIterator begin()
- {
- return isArray() ? firstChild() : null();
- }
- JsonArrayIterator end()
- {
- return isArray() ? nextSibling() : null();
- }
- DEPRECATED int getLength()
- {
- return size();
- }
-
- DEPRECATED JsonArray getArray(int index)
- {
- return operator[](index);
- }
- DEPRECATED bool getBool(int index)
- {
- return operator[](index);
- }
- DEPRECATED double getDouble(int index)
- {
- return operator[](index);
- }
- DEPRECATED JsonObject getHashTable(int index);
- DEPRECATED long getLong(int index)
- {
- return operator[](index);
- }
- DEPRECATED char* getString(int index)
- {
- return operator[](index);
- }
- };
- }
- }
|