forked from bblanchon/ArduinoJson
Templatized all functions using String or std::string
* Removed `ArduinoJson::String` * Removed `JsonVariant::defaultValue<T>()` * Removed non-template `JsonObject::get()` and `JsonArray.get()` * Fixed support for `StringSumHelper` (issue #184) * Replaced `ARDUINOJSON_USE_ARDUINO_STRING` by `ARDUINOJSON_ENABLE_STD_STRING` and `ARDUINOJSON_ENABLE_ARDUINO_STRING` (issue #378) * Added example `StringExample.ino` to show where `String` can be used
This commit is contained in:
1 parent
7ad57f1c33
commit
aa2ef79e55
31 files changed
+622
-545
No files matched your search
@@ -8,7 +8,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "Internals/JsonVariantAs.hpp"
|
||||
#include "JsonObjectKey.hpp"
|
||||
#include "Polyfills/attributes.hpp"
|
||||
|
||||
namespace ArduinoJson {
|
||||
@@ -77,10 +76,9 @@ class JsonVariantBase : public Internals::JsonPrintable<TImpl> {
|
||||
// Returns the value associated with the specified key if the variant is
|
||||
// an object.
|
||||
// Return JsonVariant::invalid() if the variant is not an object.
|
||||
FORCE_INLINE const JsonObjectSubscript<const char *> operator[](
|
||||
const char *key) const;
|
||||
FORCE_INLINE const JsonObjectSubscript<const String &> operator[](
|
||||
const String &key) const;
|
||||
template <typename TString>
|
||||
FORCE_INLINE const JsonObjectSubscript<TString> operator[](
|
||||
const TString &key) const;
|
||||
|
||||
private:
|
||||
const TImpl *impl() const {
|
||||
|
||||
Reference in new issue
Block a user