diff --git a/CHANGELOG.md b/CHANGELOG.md index 0649c8fd..3b15121d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ HEAD * Fixed an access violation in `DynamicJsonBuffer` when memory allocation fails (issue #433) * Added operators `==` and `!=` for two `JsonVariant`s (issue #436) +* Fixed `JsonVariant::operator[const FlashStringHelper*]` (issue #441) v5.8.2 ------ diff --git a/include/ArduinoJson/JsonVariantBase.hpp b/include/ArduinoJson/JsonVariantBase.hpp index 8961a3f4..04721847 100644 --- a/include/ArduinoJson/JsonVariantBase.hpp +++ b/include/ArduinoJson/JsonVariantBase.hpp @@ -97,7 +97,7 @@ class JsonVariantBase : public Internals::JsonPrintable { } // // const JsonObjectSubscript operator[](TKey) const; - // TKey = const char*, const char[N], const FlashStringHelper* + // TKey = const std::string&, const String& template FORCE_INLINE typename TypeTraits::EnableIf< Internals::StringTraits::has_equals, @@ -107,10 +107,10 @@ class JsonVariantBase : public Internals::JsonPrintable { } // // JsonObjectSubscript operator[](TKey); - // TKey = const std::string&, const String& + // TKey = const char*, const char[N], const FlashStringHelper* template FORCE_INLINE typename TypeTraits::EnableIf< - Internals::StringTraits::has_equals, + Internals::StringTraits::has_equals, JsonObjectSubscript >::type operator[](const TString *key) { return as()[key];