Added JsonObjectIterator

This commit is contained in:
Benoit Blanchon
2014-10-22 21:56:38 +02:00
parent 7e98d136f4
commit 40ac60b941
5 changed files with 121 additions and 1 deletions

View File

@@ -0,0 +1,28 @@
#pragma once
#include "ArduinoJson/JsonValue.hpp"
namespace ArduinoJson
{
class JsonObjectKeyValue
{
public:
explicit JsonObjectKeyValue(Internals::JsonNode* node)
: _node(node)
{
}
const char* key()
{
return _node->getAsObjectKey();
}
JsonValue value()
{
return JsonValue(_node->getAsObjectValue());
}
private:
Internals::JsonNode* _node;
};
}