| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- #pragma once
- #include "ArduinoJson/JsonValue.hpp"
- namespace ArduinoJson
- {
- class JsonObjectKeyValue
- {
- public:
- explicit JsonObjectKeyValue(Internals::JsonNode* node)
- : _node(node)
- {
- }
- const char* key() const
- {
- return _node->getAsObjectKey();
- }
- JsonValue value()
- {
- return JsonValue(_node->getAsObjectValue());
- }
- 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;
- };
- }
|