Rename ArrayRef to JsonArray

This commit is contained in:
Benoit Blanchon
2022-12-19 12:10:58 +01:00
parent 208a22e324
commit 7079aa99d7
15 changed files with 60 additions and 59 deletions

View File

@@ -4,7 +4,7 @@
#pragma once
#include <ArduinoJson/Array/ArrayRef.hpp>
#include <ArduinoJson/Array/JsonArray.hpp>
#include <ArduinoJson/Document/JsonDocument.hpp>
namespace ARDUINOJSON_NAMESPACE {
@@ -45,13 +45,13 @@ inline bool copyArray(const char* src, size_t, const TDestination& dst) {
// Copy array to a JsonDocument
template <typename T>
inline bool copyArray(const T& src, JsonDocument& dst) {
return copyArray(src, dst.to<ArrayRef>());
return copyArray(src, dst.to<JsonArray>());
}
// Copy a ptr+size array to a JsonDocument
template <typename T>
inline bool copyArray(const T* src, size_t len, JsonDocument& dst) {
return copyArray(src, len, dst.to<ArrayRef>());
return copyArray(src, len, dst.to<JsonArray>());
}
// Trivial case form to stop the recursion