Fix VLA support in JsonDocument::set()

This commit is contained in:
Benoit Blanchon
2024-11-08 09:37:23 +01:00
parent c6c0649d70
commit 1110d62128
4 changed files with 88 additions and 0 deletions
@@ -142,6 +142,13 @@ class JsonDocument : public detail::VariantOperators<const JsonDocument&> {
return to<JsonVariant>().set(src);
}
// Replaces the root with the specified value.
// https://arduinojson.org/v7/api/jsondocument/set/
template <typename TChar>
bool set(TChar* src) {
return to<JsonVariant>().set(src);
}
// Clears the document and converts it to the specified type.
// https://arduinojson.org/v7/api/jsondocument/to/
template <typename T>