Renamed JsonKey to JsonString

This commit is contained in:
Benoit Blanchon
2018-12-07 12:08:30 +01:00
parent e20c47c57b
commit d8a1eec530
26 changed files with 135 additions and 134 deletions

View File

@ -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