Populates the JsonArray
with values from a C array.
// 1D arrays
JsonArray::copyFrom(T array[len]);
JsonArray::copyFrom(T* array, size_t len);
// 2D arrays
JsonArray::copyFrom(T array[][]);
Arguments
array
: an array of value of type T
.
len
: the number of elements in the array.
T
: the type of the value, can be any type supported by ArduinoJson.
true
if the operation is successful; or false
if there was not enough room in the JsonBuffer
.
int values[] = {1, 2, 3};
StaticJsonBuffer<200> jsonBuffer;
JsonArray& array = jsonBuffer.createArray();
array.copyFrom(values);
array.printTo(Serial);
will write
See alsoRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4