diff options
Diffstat (limited to 'include/lib/ArduinoJson/Deserialization/Readers/ArduinoStringReader.hpp')
-rw-r--r-- | include/lib/ArduinoJson/Deserialization/Readers/ArduinoStringReader.hpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/lib/ArduinoJson/Deserialization/Readers/ArduinoStringReader.hpp b/include/lib/ArduinoJson/Deserialization/Readers/ArduinoStringReader.hpp new file mode 100644 index 0000000..71571d4 --- /dev/null +++ b/include/lib/ArduinoJson/Deserialization/Readers/ArduinoStringReader.hpp @@ -0,0 +1,17 @@ +// ArduinoJson - https://arduinojson.org +// Copyright Benoit Blanchon 2014-2021 +// MIT License + +#pragma once + +namespace ARDUINOJSON_NAMESPACE { + +template <typename TSource> +struct Reader<TSource, + typename enable_if<is_base_of< ::String, TSource>::value>::type> + : BoundedReader<const char*> { + explicit Reader(const ::String& s) + : BoundedReader<const char*>(s.c_str(), s.length()) {} +}; + +} // namespace ARDUINOJSON_NAMESPACE |