forked from bblanchon/ArduinoJson
37 lines
643 B
C++
37 lines
643 B
C++
#pragma once
|
|
|
|
#include "Arduino/Printable.h"
|
|
|
|
class JsonValue;
|
|
struct JsonNode;
|
|
|
|
class JsonObject : public Printable
|
|
{
|
|
friend JsonValue;
|
|
|
|
public:
|
|
JsonObject()
|
|
: _node(0)
|
|
{
|
|
}
|
|
|
|
JsonObject(JsonNode* node)
|
|
: _node(node)
|
|
{
|
|
}
|
|
|
|
size_t size();
|
|
|
|
JsonValue operator[](const char* key);
|
|
void remove(const char* key);
|
|
|
|
bool operator==(const JsonObject& other) const;
|
|
|
|
size_t printTo(char* buffer, size_t bufferSize) const;
|
|
virtual size_t printTo(Print& print) const;
|
|
|
|
private:
|
|
JsonNode* _node;
|
|
|
|
JsonNode* getOrCreateNodeAt(char const* key);
|
|
}; |