mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-02 08:48:27 +01:00
Added JsonObjectIterator
This commit is contained in:
28
include/ArduinoJson/JsonObjectKeyValue.hpp
Normal file
28
include/ArduinoJson/JsonObjectKeyValue.hpp
Normal 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;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user