mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-01 16:14:05 +01:00
35 lines
789 B
C++
35 lines
789 B
C++
// Copyright Benoit Blanchon 2014
|
|
// MIT License
|
|
//
|
|
// Arduino JSON library
|
|
// https://github.com/bblanchon/ArduinoJson
|
|
|
|
#pragma once
|
|
|
|
#include "ArduinoJson/JsonContainer.hpp"
|
|
#include "ArduinoJson/JsonObjectIterator.hpp"
|
|
|
|
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);
|
|
};
|
|
}
|