2014-10-16 00:11:23 +02:00
|
|
|
#pragma once
|
|
|
|
|
2014-10-22 21:56:38 +02:00
|
|
|
#include "ArduinoJson/JsonContainer.hpp"
|
|
|
|
#include "ArduinoJson/JsonObjectIterator.hpp"
|
2014-10-16 00:11:23 +02:00
|
|
|
|
2014-10-23 19:54:00 +02:00
|
|
|
namespace ArduinoJson {
|
|
|
|
class JsonObject : public JsonContainer {
|
|
|
|
public:
|
|
|
|
JsonObject() {}
|
|
|
|
|
|
|
|
explicit JsonObject(Internals::JsonNode *node) : JsonContainer(node) {}
|
|
|
|
|
|
|
|
JsonValue operator[](const char *key);
|
|
|
|
void remove(const char *key);
|
|
|
|
|
|
|
|
JsonArray createNestedArray(const char *key);
|
|
|
|
JsonObject createNestedObject(const char *key);
|
|
|
|
|
|
|
|
bool success() { return _node && _node->isObject(); }
|
|
|
|
|
|
|
|
JsonObjectIterator begin();
|
|
|
|
|
|
|
|
JsonObjectIterator end() { return JsonObjectIterator(0); }
|
|
|
|
|
|
|
|
private:
|
|
|
|
Internals::JsonNode *getOrCreateNodeAt(const char *key);
|
|
|
|
};
|
2014-10-18 23:05:54 +02:00
|
|
|
}
|