mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-21 06:22:23 +02:00
Renamed JsonKey
to JsonString
This commit is contained in:
@ -4,20 +4,21 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../Strings/String.hpp"
|
||||
#include "../Variant/VariantRef.hpp"
|
||||
#include "Key.hpp"
|
||||
|
||||
namespace ARDUINOJSON_NAMESPACE {
|
||||
// A key value pair for CollectionData.
|
||||
class Pair {
|
||||
public:
|
||||
Pair(MemoryPool* pool, VariantSlot* slot) : _key(slot) {
|
||||
Pair(MemoryPool* pool, VariantSlot* slot) {
|
||||
if (slot) {
|
||||
_key = slot->key();
|
||||
_value = VariantRef(pool, slot->data());
|
||||
}
|
||||
}
|
||||
|
||||
Key key() const {
|
||||
String key() const {
|
||||
return _key;
|
||||
}
|
||||
|
||||
@ -26,19 +27,20 @@ class Pair {
|
||||
}
|
||||
|
||||
private:
|
||||
Key _key;
|
||||
String _key;
|
||||
VariantRef _value;
|
||||
};
|
||||
|
||||
class PairConst {
|
||||
public:
|
||||
PairConst(const VariantSlot* slot) : _key(slot) {
|
||||
PairConst(const VariantSlot* slot) {
|
||||
if (slot) {
|
||||
_key = slot->key();
|
||||
_value = VariantConstRef(slot->data());
|
||||
}
|
||||
}
|
||||
|
||||
Key key() const {
|
||||
String key() const {
|
||||
return _key;
|
||||
}
|
||||
|
||||
@ -47,7 +49,7 @@ class PairConst {
|
||||
}
|
||||
|
||||
private:
|
||||
Key _key;
|
||||
String _key;
|
||||
VariantConstRef _value;
|
||||
};
|
||||
} // namespace ARDUINOJSON_NAMESPACE
|
||||
|
Reference in New Issue
Block a user