mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-02 00:38:26 +01:00
Improved JsonObjectIterator
This commit is contained in:
@@ -4,40 +4,40 @@
|
||||
|
||||
namespace ArduinoJson
|
||||
{
|
||||
class JsonObjectKeyValue
|
||||
{
|
||||
public:
|
||||
explicit JsonObjectKeyValue(Internals::JsonNode* node)
|
||||
: _node(node)
|
||||
{
|
||||
}
|
||||
class JsonObjectKeyValue
|
||||
{
|
||||
public:
|
||||
explicit JsonObjectKeyValue(Internals::JsonNode* node)
|
||||
: _node(node)
|
||||
{
|
||||
}
|
||||
|
||||
const char* key() const
|
||||
{
|
||||
return _node->getAsObjectKey();
|
||||
}
|
||||
const char* key() const
|
||||
{
|
||||
return _node->getAsObjectKey();
|
||||
}
|
||||
|
||||
JsonValue value()
|
||||
{
|
||||
return JsonValue(_node->getAsObjectValue());
|
||||
}
|
||||
JsonValue value()
|
||||
{
|
||||
return JsonValue(_node->getAsObjectValue());
|
||||
}
|
||||
|
||||
void operator++()
|
||||
{
|
||||
_node = _node->next;
|
||||
}
|
||||
bool operator==(const JsonObjectKeyValue& other) const
|
||||
{
|
||||
return _node == other._node;
|
||||
}
|
||||
|
||||
bool operator==(const JsonObjectKeyValue& other) const
|
||||
{
|
||||
return _node == other._node;
|
||||
}
|
||||
bool operator!=(const JsonObjectKeyValue& other) const
|
||||
{
|
||||
return _node != other._node;
|
||||
}
|
||||
|
||||
bool operator!=(const JsonObjectKeyValue& other) const
|
||||
{
|
||||
return _node != other._node;
|
||||
}
|
||||
Internals::JsonNode* next()
|
||||
{
|
||||
return _node->next;
|
||||
}
|
||||
|
||||
private:
|
||||
Internals::JsonNode* _node;
|
||||
};
|
||||
private:
|
||||
Internals::JsonNode* _node;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user