Files
ArduinoJson/srcs/JsonObject.h

37 lines
635 B
C
Raw Normal View History

#pragma once
2014-09-30 16:40:00 +02:00
#include "Printable.h"
class JsonValue;
struct JsonNode;
2014-09-30 16:43:10 +02:00
class JsonObject : public Printable
{
friend JsonValue;
public:
2014-09-27 15:19:03 +02:00
JsonObject()
: _node(0)
{
}
JsonObject(JsonNode* node)
: _node(node)
{
}
size_t size();
JsonValue operator[](const char* key);
void remove(const char* key);
2014-09-28 21:04:59 +02:00
bool operator==(const JsonObject& other) const;
2014-09-30 16:43:10 +02:00
size_t printTo(char* buffer, size_t bufferSize) const;
virtual size_t printTo(Print& print) const;
2014-09-30 16:31:22 +02:00
2014-09-27 15:19:03 +02:00
private:
JsonNode* _node;
JsonNode* getOrCreateNodeAt(char const* key);
};