mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-01 00:38:27 +01:00
Add StringAdapter<T>
This commit is contained in:
@@ -24,9 +24,14 @@ class JsonStringAdapter : public SizedRamString {
|
||||
bool _linked;
|
||||
};
|
||||
|
||||
inline JsonStringAdapter adaptString(const String& s) {
|
||||
return JsonStringAdapter(s);
|
||||
}
|
||||
template <>
|
||||
struct StringAdapter<String> {
|
||||
typedef JsonStringAdapter AdaptedString;
|
||||
|
||||
static AdaptedString adapt(const String& s) {
|
||||
return AdaptedString(s);
|
||||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct IsString<String> : true_type {};
|
||||
|
||||
Reference in New Issue
Block a user