mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
upgrade to 7.2.1
This commit is contained in:
@@ -239,11 +239,11 @@
|
|||||||
#define ARDUINOJSON_BIN2ALPHA_1111() P
|
#define ARDUINOJSON_BIN2ALPHA_1111() P
|
||||||
#define ARDUINOJSON_BIN2ALPHA_(A, B, C, D) ARDUINOJSON_BIN2ALPHA_##A##B##C##D()
|
#define ARDUINOJSON_BIN2ALPHA_(A, B, C, D) ARDUINOJSON_BIN2ALPHA_##A##B##C##D()
|
||||||
#define ARDUINOJSON_BIN2ALPHA(A, B, C, D) ARDUINOJSON_BIN2ALPHA_(A, B, C, D)
|
#define ARDUINOJSON_BIN2ALPHA(A, B, C, D) ARDUINOJSON_BIN2ALPHA_(A, B, C, D)
|
||||||
#define ARDUINOJSON_VERSION "7.2.0"
|
#define ARDUINOJSON_VERSION "7.2.1"
|
||||||
#define ARDUINOJSON_VERSION_MAJOR 7
|
#define ARDUINOJSON_VERSION_MAJOR 7
|
||||||
#define ARDUINOJSON_VERSION_MINOR 2
|
#define ARDUINOJSON_VERSION_MINOR 2
|
||||||
#define ARDUINOJSON_VERSION_REVISION 0
|
#define ARDUINOJSON_VERSION_REVISION 1
|
||||||
#define ARDUINOJSON_VERSION_MACRO V720
|
#define ARDUINOJSON_VERSION_MACRO V721
|
||||||
#ifndef ARDUINOJSON_VERSION_NAMESPACE
|
#ifndef ARDUINOJSON_VERSION_NAMESPACE
|
||||||
# define ARDUINOJSON_VERSION_NAMESPACE \
|
# define ARDUINOJSON_VERSION_NAMESPACE \
|
||||||
ARDUINOJSON_CONCAT5( \
|
ARDUINOJSON_CONCAT5( \
|
||||||
@@ -323,15 +323,15 @@ template <int Bits>
|
|||||||
struct uint_;
|
struct uint_;
|
||||||
template <>
|
template <>
|
||||||
struct uint_<8> {
|
struct uint_<8> {
|
||||||
typedef uint8_t type;
|
using type = uint8_t;
|
||||||
};
|
};
|
||||||
template <>
|
template <>
|
||||||
struct uint_<16> {
|
struct uint_<16> {
|
||||||
typedef uint16_t type;
|
using type = uint16_t;
|
||||||
};
|
};
|
||||||
template <>
|
template <>
|
||||||
struct uint_<32> {
|
struct uint_<32> {
|
||||||
typedef uint32_t type;
|
using type = uint32_t;
|
||||||
};
|
};
|
||||||
template <int Bits>
|
template <int Bits>
|
||||||
using uint_t = typename uint_<Bits>::type;
|
using uint_t = typename uint_<Bits>::type;
|
||||||
@@ -417,11 +417,11 @@ class MemoryPool {
|
|||||||
};
|
};
|
||||||
template <bool Condition, class TrueType, class FalseType>
|
template <bool Condition, class TrueType, class FalseType>
|
||||||
struct conditional {
|
struct conditional {
|
||||||
typedef TrueType type;
|
using type = TrueType;
|
||||||
};
|
};
|
||||||
template <class TrueType, class FalseType>
|
template <class TrueType, class FalseType>
|
||||||
struct conditional<false, TrueType, FalseType> {
|
struct conditional<false, TrueType, FalseType> {
|
||||||
typedef FalseType type;
|
using type = FalseType;
|
||||||
};
|
};
|
||||||
template <bool Condition, class TrueType, class FalseType>
|
template <bool Condition, class TrueType, class FalseType>
|
||||||
using conditional_t =
|
using conditional_t =
|
||||||
@@ -430,7 +430,7 @@ template <bool Condition, typename T = void>
|
|||||||
struct enable_if {};
|
struct enable_if {};
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct enable_if<true, T> {
|
struct enable_if<true, T> {
|
||||||
typedef T type;
|
using type = T;
|
||||||
};
|
};
|
||||||
template <bool Condition, typename T = void>
|
template <bool Condition, typename T = void>
|
||||||
using enable_if_t = typename enable_if<Condition, T>::type;
|
using enable_if_t = typename enable_if<Condition, T>::type;
|
||||||
@@ -451,8 +451,10 @@ template <typename T, T v>
|
|||||||
struct integral_constant {
|
struct integral_constant {
|
||||||
static const T value = v;
|
static const T value = v;
|
||||||
};
|
};
|
||||||
typedef integral_constant<bool, true> true_type;
|
template <bool B>
|
||||||
typedef integral_constant<bool, false> false_type;
|
using bool_constant = integral_constant<bool, B>;
|
||||||
|
using true_type = bool_constant<true>;
|
||||||
|
using false_type = bool_constant<false>;
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct is_array : false_type {};
|
struct is_array : false_type {};
|
||||||
template <typename T>
|
template <typename T>
|
||||||
@@ -461,11 +463,11 @@ template <typename T, size_t N>
|
|||||||
struct is_array<T[N]> : true_type {};
|
struct is_array<T[N]> : true_type {};
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct remove_reference {
|
struct remove_reference {
|
||||||
typedef T type;
|
using type = T;
|
||||||
};
|
};
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct remove_reference<T&> {
|
struct remove_reference<T&> {
|
||||||
typedef T type;
|
using type = T;
|
||||||
};
|
};
|
||||||
template <typename T>
|
template <typename T>
|
||||||
using remove_reference_t = typename remove_reference<T>::type;
|
using remove_reference_t = typename remove_reference<T>::type;
|
||||||
@@ -509,7 +511,7 @@ struct is_convertible {
|
|||||||
protected: // <- to avoid GCC's "all member functions in class are private"
|
protected: // <- to avoid GCC's "all member functions in class are private"
|
||||||
static int probe(To);
|
static int probe(To);
|
||||||
static char probe(...);
|
static char probe(...);
|
||||||
static From& from_;
|
static const From& from_;
|
||||||
public:
|
public:
|
||||||
static const bool value = sizeof(probe(from_)) == sizeof(int);
|
static const bool value = sizeof(probe(from_)) == sizeof(int);
|
||||||
};
|
};
|
||||||
@@ -527,19 +529,19 @@ template <typename T>
|
|||||||
struct is_same<T, T> : true_type {};
|
struct is_same<T, T> : true_type {};
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct remove_cv {
|
struct remove_cv {
|
||||||
typedef T type;
|
using type = T;
|
||||||
};
|
};
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct remove_cv<const T> {
|
struct remove_cv<const T> {
|
||||||
typedef T type;
|
using type = T;
|
||||||
};
|
};
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct remove_cv<volatile T> {
|
struct remove_cv<volatile T> {
|
||||||
typedef T type;
|
using type = T;
|
||||||
};
|
};
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct remove_cv<const volatile T> {
|
struct remove_cv<const volatile T> {
|
||||||
typedef T type;
|
using type = T;
|
||||||
};
|
};
|
||||||
template <typename T>
|
template <typename T>
|
||||||
using remove_cv_t = typename remove_cv<T>::type;
|
using remove_cv_t = typename remove_cv<T>::type;
|
||||||
@@ -592,7 +594,7 @@ struct is_unsigned : integral_constant<bool,
|
|||||||
is_same<remove_cv_t<T>, bool>::value> {};
|
is_same<remove_cv_t<T>, bool>::value> {};
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct type_identity {
|
struct type_identity {
|
||||||
typedef T type;
|
using type = T;
|
||||||
};
|
};
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct make_unsigned;
|
struct make_unsigned;
|
||||||
@@ -622,11 +624,11 @@ template <typename T>
|
|||||||
using make_unsigned_t = typename make_unsigned<T>::type;
|
using make_unsigned_t = typename make_unsigned<T>::type;
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct remove_const {
|
struct remove_const {
|
||||||
typedef T type;
|
using type = T;
|
||||||
};
|
};
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct remove_const<const T> {
|
struct remove_const<const T> {
|
||||||
typedef T type;
|
using type = T;
|
||||||
};
|
};
|
||||||
template <typename T>
|
template <typename T>
|
||||||
using remove_const_t = typename remove_const<T>::type;
|
using remove_const_t = typename remove_const<T>::type;
|
||||||
@@ -964,16 +966,6 @@ class ZeroTerminatedRamString {
|
|||||||
const char* data() const {
|
const char* data() const {
|
||||||
return str_;
|
return str_;
|
||||||
}
|
}
|
||||||
friend int stringCompare(ZeroTerminatedRamString a,
|
|
||||||
ZeroTerminatedRamString b) {
|
|
||||||
ARDUINOJSON_ASSERT(!a.isNull());
|
|
||||||
ARDUINOJSON_ASSERT(!b.isNull());
|
|
||||||
return ::strcmp(a.str_, b.str_);
|
|
||||||
}
|
|
||||||
friend bool stringEquals(ZeroTerminatedRamString a,
|
|
||||||
ZeroTerminatedRamString b) {
|
|
||||||
return stringCompare(a, b) == 0;
|
|
||||||
}
|
|
||||||
bool isLinked() const {
|
bool isLinked() const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -982,14 +974,14 @@ class ZeroTerminatedRamString {
|
|||||||
};
|
};
|
||||||
template <typename TChar>
|
template <typename TChar>
|
||||||
struct StringAdapter<TChar*, enable_if_t<IsChar<TChar>::value>> {
|
struct StringAdapter<TChar*, enable_if_t<IsChar<TChar>::value>> {
|
||||||
typedef ZeroTerminatedRamString AdaptedString;
|
using AdaptedString = ZeroTerminatedRamString;
|
||||||
static AdaptedString adapt(const TChar* p) {
|
static AdaptedString adapt(const TChar* p) {
|
||||||
return AdaptedString(reinterpret_cast<const char*>(p));
|
return AdaptedString(reinterpret_cast<const char*>(p));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
template <typename TChar, size_t N>
|
template <typename TChar, size_t N>
|
||||||
struct StringAdapter<TChar[N], enable_if_t<IsChar<TChar>::value>> {
|
struct StringAdapter<TChar[N], enable_if_t<IsChar<TChar>::value>> {
|
||||||
typedef ZeroTerminatedRamString AdaptedString;
|
using AdaptedString = ZeroTerminatedRamString;
|
||||||
static AdaptedString adapt(const TChar* p) {
|
static AdaptedString adapt(const TChar* p) {
|
||||||
return AdaptedString(reinterpret_cast<const char*>(p));
|
return AdaptedString(reinterpret_cast<const char*>(p));
|
||||||
}
|
}
|
||||||
@@ -1003,7 +995,7 @@ class StaticStringAdapter : public ZeroTerminatedRamString {
|
|||||||
};
|
};
|
||||||
template <>
|
template <>
|
||||||
struct StringAdapter<const char*, void> {
|
struct StringAdapter<const char*, void> {
|
||||||
typedef StaticStringAdapter AdaptedString;
|
using AdaptedString = StaticStringAdapter;
|
||||||
static AdaptedString adapt(const char* p) {
|
static AdaptedString adapt(const char* p) {
|
||||||
return AdaptedString(p);
|
return AdaptedString(p);
|
||||||
}
|
}
|
||||||
@@ -1035,7 +1027,7 @@ class SizedRamString {
|
|||||||
};
|
};
|
||||||
template <typename TChar>
|
template <typename TChar>
|
||||||
struct SizedStringAdapter<TChar*, enable_if_t<IsChar<TChar>::value>> {
|
struct SizedStringAdapter<TChar*, enable_if_t<IsChar<TChar>::value>> {
|
||||||
typedef SizedRamString AdaptedString;
|
using AdaptedString = SizedRamString;
|
||||||
static AdaptedString adapt(const TChar* p, size_t n) {
|
static AdaptedString adapt(const TChar* p, size_t n) {
|
||||||
return AdaptedString(reinterpret_cast<const char*>(p), n);
|
return AdaptedString(reinterpret_cast<const char*>(p), n);
|
||||||
}
|
}
|
||||||
@@ -1107,7 +1099,7 @@ class JsonStringAdapter : public SizedRamString {
|
|||||||
};
|
};
|
||||||
template <>
|
template <>
|
||||||
struct StringAdapter<JsonString> {
|
struct StringAdapter<JsonString> {
|
||||||
typedef JsonStringAdapter AdaptedString;
|
using AdaptedString = JsonStringAdapter;
|
||||||
static AdaptedString adapt(const JsonString& s) {
|
static AdaptedString adapt(const JsonString& s) {
|
||||||
return AdaptedString(s);
|
return AdaptedString(s);
|
||||||
}
|
}
|
||||||
@@ -1150,7 +1142,7 @@ struct StringAdapter<
|
|||||||
T,
|
T,
|
||||||
enable_if_t<(string_traits<T>::has_cstr || string_traits<T>::has_data) &&
|
enable_if_t<(string_traits<T>::has_cstr || string_traits<T>::has_data) &&
|
||||||
(string_traits<T>::has_length || string_traits<T>::has_size)>> {
|
(string_traits<T>::has_length || string_traits<T>::has_size)>> {
|
||||||
typedef SizedRamString AdaptedString;
|
using AdaptedString = SizedRamString;
|
||||||
static AdaptedString adapt(const T& s) {
|
static AdaptedString adapt(const T& s) {
|
||||||
return AdaptedString(get_data(s), get_size(s));
|
return AdaptedString(get_data(s), get_size(s));
|
||||||
}
|
}
|
||||||
@@ -1350,14 +1342,14 @@ class FlashString {
|
|||||||
};
|
};
|
||||||
template <>
|
template <>
|
||||||
struct StringAdapter<const __FlashStringHelper*, void> {
|
struct StringAdapter<const __FlashStringHelper*, void> {
|
||||||
typedef FlashString AdaptedString;
|
using AdaptedString = FlashString;
|
||||||
static AdaptedString adapt(const __FlashStringHelper* s) {
|
static AdaptedString adapt(const __FlashStringHelper* s) {
|
||||||
return AdaptedString(s, s ? strlen_P(reinterpret_cast<const char*>(s)) : 0);
|
return AdaptedString(s, s ? strlen_P(reinterpret_cast<const char*>(s)) : 0);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
template <>
|
template <>
|
||||||
struct SizedStringAdapter<const __FlashStringHelper*, void> {
|
struct SizedStringAdapter<const __FlashStringHelper*, void> {
|
||||||
typedef FlashString AdaptedString;
|
using AdaptedString = FlashString;
|
||||||
static AdaptedString adapt(const __FlashStringHelper* s, size_t n) {
|
static AdaptedString adapt(const __FlashStringHelper* s, size_t n) {
|
||||||
return AdaptedString(s, n);
|
return AdaptedString(s, n);
|
||||||
}
|
}
|
||||||
@@ -1616,11 +1608,11 @@ template <typename T, size_t = sizeof(T)>
|
|||||||
struct FloatTraits {};
|
struct FloatTraits {};
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct FloatTraits<T, 8 /*64bits*/> {
|
struct FloatTraits<T, 8 /*64bits*/> {
|
||||||
typedef uint64_t mantissa_type;
|
using mantissa_type = uint64_t;
|
||||||
static const short mantissa_bits = 52;
|
static const short mantissa_bits = 52;
|
||||||
static const mantissa_type mantissa_max =
|
static const mantissa_type mantissa_max =
|
||||||
(mantissa_type(1) << mantissa_bits) - 1;
|
(mantissa_type(1) << mantissa_bits) - 1;
|
||||||
typedef int16_t exponent_type;
|
using exponent_type = int16_t;
|
||||||
static const exponent_type exponent_max = 308;
|
static const exponent_type exponent_max = 308;
|
||||||
static pgm_ptr<T> positiveBinaryPowersOfTen() {
|
static pgm_ptr<T> positiveBinaryPowersOfTen() {
|
||||||
ARDUINOJSON_DEFINE_PROGMEM_ARRAY( //
|
ARDUINOJSON_DEFINE_PROGMEM_ARRAY( //
|
||||||
@@ -1686,11 +1678,11 @@ struct FloatTraits<T, 8 /*64bits*/> {
|
|||||||
};
|
};
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct FloatTraits<T, 4 /*32bits*/> {
|
struct FloatTraits<T, 4 /*32bits*/> {
|
||||||
typedef uint32_t mantissa_type;
|
using mantissa_type = uint32_t;
|
||||||
static const short mantissa_bits = 23;
|
static const short mantissa_bits = 23;
|
||||||
static const mantissa_type mantissa_max =
|
static const mantissa_type mantissa_max =
|
||||||
(mantissa_type(1) << mantissa_bits) - 1;
|
(mantissa_type(1) << mantissa_bits) - 1;
|
||||||
typedef int8_t exponent_type;
|
using exponent_type = int8_t;
|
||||||
static const exponent_type exponent_max = 38;
|
static const exponent_type exponent_max = 38;
|
||||||
static pgm_ptr<T> positiveBinaryPowersOfTen() {
|
static pgm_ptr<T> positiveBinaryPowersOfTen() {
|
||||||
ARDUINOJSON_DEFINE_PROGMEM_ARRAY(uint32_t, factors,
|
ARDUINOJSON_DEFINE_PROGMEM_ARRAY(uint32_t, factors,
|
||||||
@@ -1777,9 +1769,9 @@ inline TFloat make_float(TFloat m, TExponent e) {
|
|||||||
ARDUINOJSON_END_PRIVATE_NAMESPACE
|
ARDUINOJSON_END_PRIVATE_NAMESPACE
|
||||||
ARDUINOJSON_BEGIN_PUBLIC_NAMESPACE
|
ARDUINOJSON_BEGIN_PUBLIC_NAMESPACE
|
||||||
#if ARDUINOJSON_USE_DOUBLE
|
#if ARDUINOJSON_USE_DOUBLE
|
||||||
typedef double JsonFloat;
|
using JsonFloat = double;
|
||||||
#else
|
#else
|
||||||
typedef float JsonFloat;
|
using JsonFloat = float;
|
||||||
#endif
|
#endif
|
||||||
ARDUINOJSON_END_PUBLIC_NAMESPACE
|
ARDUINOJSON_END_PUBLIC_NAMESPACE
|
||||||
ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE
|
ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE
|
||||||
@@ -1996,11 +1988,11 @@ class ArrayData : public CollectionData {
|
|||||||
ARDUINOJSON_END_PRIVATE_NAMESPACE
|
ARDUINOJSON_END_PRIVATE_NAMESPACE
|
||||||
ARDUINOJSON_BEGIN_PUBLIC_NAMESPACE
|
ARDUINOJSON_BEGIN_PUBLIC_NAMESPACE
|
||||||
#if ARDUINOJSON_USE_LONG_LONG
|
#if ARDUINOJSON_USE_LONG_LONG
|
||||||
typedef int64_t JsonInteger;
|
using JsonInteger = int64_t;
|
||||||
typedef uint64_t JsonUInt;
|
using JsonUInt = uint64_t;
|
||||||
#else
|
#else
|
||||||
typedef long JsonInteger;
|
using JsonInteger = long;
|
||||||
typedef unsigned long JsonUInt;
|
using JsonUInt = unsigned long;
|
||||||
#endif
|
#endif
|
||||||
ARDUINOJSON_END_PUBLIC_NAMESPACE
|
ARDUINOJSON_END_PUBLIC_NAMESPACE
|
||||||
#define ARDUINOJSON_ASSERT_INTEGER_TYPE_IS_SUPPORTED(T) \
|
#define ARDUINOJSON_ASSERT_INTEGER_TYPE_IS_SUPPORTED(T) \
|
||||||
@@ -2675,15 +2667,15 @@ template <typename T>
|
|||||||
struct VariantTo {};
|
struct VariantTo {};
|
||||||
template <>
|
template <>
|
||||||
struct VariantTo<JsonArray> {
|
struct VariantTo<JsonArray> {
|
||||||
typedef JsonArray type;
|
using type = JsonArray;
|
||||||
};
|
};
|
||||||
template <>
|
template <>
|
||||||
struct VariantTo<JsonObject> {
|
struct VariantTo<JsonObject> {
|
||||||
typedef JsonObject type;
|
using type = JsonObject;
|
||||||
};
|
};
|
||||||
template <>
|
template <>
|
||||||
struct VariantTo<JsonVariant> {
|
struct VariantTo<JsonVariant> {
|
||||||
typedef JsonVariant type;
|
using type = JsonVariant;
|
||||||
};
|
};
|
||||||
class VariantAttorney {
|
class VariantAttorney {
|
||||||
public:
|
public:
|
||||||
@@ -3008,7 +3000,7 @@ class JsonVariantConst : public detail::VariantTag,
|
|||||||
if (key.template is<size_t>())
|
if (key.template is<size_t>())
|
||||||
return operator[](key.template as<size_t>());
|
return operator[](key.template as<size_t>());
|
||||||
else
|
else
|
||||||
return operator[](key.template as<const char*>());
|
return operator[](key.template as<JsonString>());
|
||||||
}
|
}
|
||||||
template <typename TString>
|
template <typename TString>
|
||||||
ARDUINOJSON_DEPRECATED("use var[key].is<T>() instead")
|
ARDUINOJSON_DEPRECATED("use var[key].is<T>() instead")
|
||||||
@@ -3155,7 +3147,7 @@ class VariantRefBase : public VariantTag {
|
|||||||
if (key.template is<size_t>())
|
if (key.template is<size_t>())
|
||||||
return operator[](key.template as<size_t>());
|
return operator[](key.template as<size_t>());
|
||||||
else
|
else
|
||||||
return operator[](key.template as<const char*>());
|
return operator[](key.template as<JsonString>());
|
||||||
}
|
}
|
||||||
ARDUINOJSON_DEPRECATED("use add<JsonVariant>() instead")
|
ARDUINOJSON_DEPRECATED("use add<JsonVariant>() instead")
|
||||||
JsonVariant add() const;
|
JsonVariant add() const;
|
||||||
@@ -3392,7 +3384,7 @@ class JsonArrayConst : public detail::VariantOperators<JsonArrayConst> {
|
|||||||
friend class JsonArray;
|
friend class JsonArray;
|
||||||
friend class detail::VariantAttorney;
|
friend class detail::VariantAttorney;
|
||||||
public:
|
public:
|
||||||
typedef JsonArrayConstIterator iterator;
|
using iterator = JsonArrayConstIterator;
|
||||||
iterator begin() const {
|
iterator begin() const {
|
||||||
if (!data_)
|
if (!data_)
|
||||||
return iterator();
|
return iterator();
|
||||||
@@ -3468,7 +3460,7 @@ class JsonObject;
|
|||||||
class JsonArray : public detail::VariantOperators<JsonArray> {
|
class JsonArray : public detail::VariantOperators<JsonArray> {
|
||||||
friend class detail::VariantAttorney;
|
friend class detail::VariantAttorney;
|
||||||
public:
|
public:
|
||||||
typedef JsonArrayIterator iterator;
|
using iterator = JsonArrayIterator;
|
||||||
JsonArray() : data_(0), resources_(0) {}
|
JsonArray() : data_(0), resources_(0) {}
|
||||||
JsonArray(detail::ArrayData* data, detail::ResourceManager* resources)
|
JsonArray(detail::ArrayData* data, detail::ResourceManager* resources)
|
||||||
: data_(data), resources_(resources) {}
|
: data_(data), resources_(resources) {}
|
||||||
@@ -3687,7 +3679,7 @@ class JsonObjectConst : public detail::VariantOperators<JsonObjectConst> {
|
|||||||
friend class JsonObject;
|
friend class JsonObject;
|
||||||
friend class detail::VariantAttorney;
|
friend class detail::VariantAttorney;
|
||||||
public:
|
public:
|
||||||
typedef JsonObjectConstIterator iterator;
|
using iterator = JsonObjectConstIterator;
|
||||||
JsonObjectConst() : data_(0), resources_(0) {}
|
JsonObjectConst() : data_(0), resources_(0) {}
|
||||||
JsonObjectConst(const detail::ObjectData* data,
|
JsonObjectConst(const detail::ObjectData* data,
|
||||||
const detail::ResourceManager* resources)
|
const detail::ResourceManager* resources)
|
||||||
@@ -3751,8 +3743,8 @@ class JsonObjectConst : public detail::VariantOperators<JsonObjectConst> {
|
|||||||
template <typename TVariant>
|
template <typename TVariant>
|
||||||
detail::enable_if_t<detail::IsVariant<TVariant>::value, JsonVariantConst>
|
detail::enable_if_t<detail::IsVariant<TVariant>::value, JsonVariantConst>
|
||||||
operator[](const TVariant& key) const {
|
operator[](const TVariant& key) const {
|
||||||
if (key.template is<const char*>())
|
if (key.template is<JsonString>())
|
||||||
return operator[](key.template as<const char*>());
|
return operator[](key.template as<JsonString>());
|
||||||
else
|
else
|
||||||
return JsonVariantConst();
|
return JsonVariantConst();
|
||||||
}
|
}
|
||||||
@@ -3835,7 +3827,7 @@ class JsonArray;
|
|||||||
class JsonObject : public detail::VariantOperators<JsonObject> {
|
class JsonObject : public detail::VariantOperators<JsonObject> {
|
||||||
friend class detail::VariantAttorney;
|
friend class detail::VariantAttorney;
|
||||||
public:
|
public:
|
||||||
typedef JsonObjectIterator iterator;
|
using iterator = JsonObjectIterator;
|
||||||
JsonObject() : data_(0), resources_(0) {}
|
JsonObject() : data_(0), resources_(0) {}
|
||||||
JsonObject(detail::ObjectData* data, detail::ResourceManager* resource)
|
JsonObject(detail::ObjectData* data, detail::ResourceManager* resource)
|
||||||
: data_(data), resources_(resource) {}
|
: data_(data), resources_(resource) {}
|
||||||
@@ -3897,10 +3889,10 @@ class JsonObject : public detail::VariantOperators<JsonObject> {
|
|||||||
}
|
}
|
||||||
template <typename TVariant>
|
template <typename TVariant>
|
||||||
detail::enable_if_t<detail::IsVariant<TVariant>::value,
|
detail::enable_if_t<detail::IsVariant<TVariant>::value,
|
||||||
detail::MemberProxy<JsonObject, const char*>>
|
detail::MemberProxy<JsonObject, JsonString>>
|
||||||
operator[](const TVariant& key) const {
|
operator[](const TVariant& key) const {
|
||||||
if (key.template is<const char*>())
|
if (key.template is<JsonString>())
|
||||||
return {*this, key.template as<const char*>()};
|
return {*this, key.template as<JsonString>()};
|
||||||
else
|
else
|
||||||
return {*this, nullptr};
|
return {*this, nullptr};
|
||||||
}
|
}
|
||||||
@@ -4059,6 +4051,10 @@ class JsonDocument : public detail::VariantOperators<const JsonDocument&> {
|
|||||||
const T& src) {
|
const T& src) {
|
||||||
return to<JsonVariant>().set(src);
|
return to<JsonVariant>().set(src);
|
||||||
}
|
}
|
||||||
|
template <typename TChar>
|
||||||
|
bool set(TChar* src) {
|
||||||
|
return to<JsonVariant>().set(src);
|
||||||
|
}
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename detail::VariantTo<T>::type to() {
|
typename detail::VariantTo<T>::type to() {
|
||||||
clear();
|
clear();
|
||||||
@@ -4117,8 +4113,8 @@ class JsonDocument : public detail::VariantOperators<const JsonDocument&> {
|
|||||||
template <typename TVariant>
|
template <typename TVariant>
|
||||||
detail::enable_if_t<detail::IsVariant<TVariant>::value, JsonVariantConst>
|
detail::enable_if_t<detail::IsVariant<TVariant>::value, JsonVariantConst>
|
||||||
operator[](const TVariant& key) const {
|
operator[](const TVariant& key) const {
|
||||||
if (key.template is<const char*>())
|
if (key.template is<JsonString>())
|
||||||
return operator[](key.template as<const char*>());
|
return operator[](key.template as<JsonString>());
|
||||||
if (key.template is<size_t>())
|
if (key.template is<size_t>())
|
||||||
return operator[](key.template as<size_t>());
|
return operator[](key.template as<size_t>());
|
||||||
return {};
|
return {};
|
||||||
@@ -4238,7 +4234,7 @@ ARDUINOJSON_END_PUBLIC_NAMESPACE
|
|||||||
ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE
|
ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE
|
||||||
template <typename TResult>
|
template <typename TResult>
|
||||||
struct VariantDataVisitor {
|
struct VariantDataVisitor {
|
||||||
typedef TResult result_type;
|
using result_type = TResult;
|
||||||
template <typename T>
|
template <typename T>
|
||||||
TResult visit(const T&) {
|
TResult visit(const T&) {
|
||||||
return TResult();
|
return TResult();
|
||||||
@@ -4246,7 +4242,7 @@ struct VariantDataVisitor {
|
|||||||
};
|
};
|
||||||
template <typename TResult>
|
template <typename TResult>
|
||||||
struct JsonVariantVisitor {
|
struct JsonVariantVisitor {
|
||||||
typedef TResult result_type;
|
using result_type = TResult;
|
||||||
template <typename T>
|
template <typename T>
|
||||||
TResult visit(const T&) {
|
TResult visit(const T&) {
|
||||||
return TResult();
|
return TResult();
|
||||||
@@ -4822,7 +4818,7 @@ struct FloatParts {
|
|||||||
};
|
};
|
||||||
template <typename TFloat>
|
template <typename TFloat>
|
||||||
inline int16_t normalize(TFloat& value) {
|
inline int16_t normalize(TFloat& value) {
|
||||||
typedef FloatTraits<TFloat> traits;
|
using traits = FloatTraits<TFloat>;
|
||||||
int16_t powersOf10 = 0;
|
int16_t powersOf10 = 0;
|
||||||
int8_t index = sizeof(TFloat) == 8 ? 8 : 5;
|
int8_t index = sizeof(TFloat) == 8 ? 8 : 5;
|
||||||
int bit = 1 << index;
|
int bit = 1 << index;
|
||||||
@@ -4965,7 +4961,7 @@ class TextFormatter {
|
|||||||
}
|
}
|
||||||
template <typename T>
|
template <typename T>
|
||||||
enable_if_t<is_signed<T>::value> writeInteger(T value) {
|
enable_if_t<is_signed<T>::value> writeInteger(T value) {
|
||||||
typedef make_unsigned_t<T> unsigned_type;
|
using unsigned_type = make_unsigned_t<T>;
|
||||||
unsigned_type unsigned_value;
|
unsigned_type unsigned_value;
|
||||||
if (value < 0) {
|
if (value < 0) {
|
||||||
writeRaw('-');
|
writeRaw('-');
|
||||||
@@ -5703,7 +5699,7 @@ ARDUINOJSON_END_PUBLIC_NAMESPACE
|
|||||||
ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE
|
ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE
|
||||||
class JsonVariantCopier {
|
class JsonVariantCopier {
|
||||||
public:
|
public:
|
||||||
typedef bool result_type;
|
using result_type = bool;
|
||||||
JsonVariantCopier(JsonVariant dst) : dst_(dst) {}
|
JsonVariantCopier(JsonVariant dst) : dst_(dst) {}
|
||||||
template <typename T>
|
template <typename T>
|
||||||
bool visit(T src) {
|
bool visit(T src) {
|
||||||
@@ -6325,13 +6321,10 @@ template <typename T, typename... Rest>
|
|||||||
struct first_or_void<T, Rest...> {
|
struct first_or_void<T, Rest...> {
|
||||||
using type = T;
|
using type = T;
|
||||||
};
|
};
|
||||||
template <class T, class = void>
|
|
||||||
struct is_deserialize_destination : false_type {};
|
|
||||||
template <class T>
|
template <class T>
|
||||||
struct is_deserialize_destination<
|
using is_deserialize_destination =
|
||||||
T, enable_if_t<is_same<decltype(VariantAttorney::getResourceManager(
|
bool_constant<is_base_of<JsonDocument, remove_cv_t<T>>::value ||
|
||||||
detail::declval<T&>())),
|
IsVariant<T>::value>;
|
||||||
ResourceManager*>::value>> : true_type {};
|
|
||||||
template <typename TDestination>
|
template <typename TDestination>
|
||||||
inline void shrinkJsonDocument(TDestination&) {
|
inline void shrinkJsonDocument(TDestination&) {
|
||||||
}
|
}
|
||||||
@@ -6571,9 +6564,9 @@ class Number {
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
inline Number parseNumber(const char* s) {
|
inline Number parseNumber(const char* s) {
|
||||||
typedef FloatTraits<JsonFloat> traits;
|
using traits = FloatTraits<JsonFloat>;
|
||||||
typedef largest_type<traits::mantissa_type, JsonUInt> mantissa_t;
|
using mantissa_t = largest_type<traits::mantissa_type, JsonUInt>;
|
||||||
typedef traits::exponent_type exponent_t;
|
using exponent_t = traits::exponent_type;
|
||||||
ARDUINOJSON_ASSERT(s != 0);
|
ARDUINOJSON_ASSERT(s != 0);
|
||||||
bool is_negative = false;
|
bool is_negative = false;
|
||||||
switch (*s) {
|
switch (*s) {
|
||||||
@@ -7212,7 +7205,7 @@ ARDUINOJSON_END_PUBLIC_NAMESPACE
|
|||||||
ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE
|
ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE
|
||||||
template <typename TWriter>
|
template <typename TWriter>
|
||||||
class PrettyJsonSerializer : public JsonSerializer<TWriter> {
|
class PrettyJsonSerializer : public JsonSerializer<TWriter> {
|
||||||
typedef JsonSerializer<TWriter> base;
|
using base = JsonSerializer<TWriter>;
|
||||||
public:
|
public:
|
||||||
PrettyJsonSerializer(TWriter writer, const ResourceManager* resources)
|
PrettyJsonSerializer(TWriter writer, const ResourceManager* resources)
|
||||||
: base(writer, resources), nesting_(0) {}
|
: base(writer, resources), nesting_(0) {}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Version 7.2.0
|
Version 7.2.1
|
||||||
|
|
||||||
From https://github.com/bblanchon/ArduinoJson/releases
|
From https://github.com/bblanchon/ArduinoJson/releases
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user