| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- /*
- * Arduino JSON library
- * Benoit Blanchon 2014 - MIT License
- */
- #pragma once
- #include "JsonValue.h"
- namespace ArduinoJson
- {
- namespace Parser
- {
- class JsonHashTable;
- class JsonArray
- {
- public:
- JsonArray() {}
- JsonArray(JsonValue& value)
- : value(value)
- {
- }
-
- bool success()
- {
- return value.success();
- }
- int size()
- {
- return value.size();
- }
- JsonValue operator[](int index)
- {
- return value[index];
- }
- DEPRECATED int getLength()
- {
- return size();
- }
-
- DEPRECATED JsonArray getArray(int index)
- {
- return (JsonArray) (*this)[index];
- }
- DEPRECATED bool getBool(int index)
- {
- return (bool) (*this)[index];
- }
- DEPRECATED double getDouble(int index)
- {
- return (double) (*this)[index];
- }
- DEPRECATED JsonHashTable getHashTable(int index);
- DEPRECATED long getLong(int index)
- {
- return (long) (*this)[index];
- }
- DEPRECATED char* getString(int index)
- {
- return (char*) (*this)[index];
- }
- private:
- JsonValue value;
- };
- }
- }
|