mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-08-24 06:51:10 +02:00
Updated API Reference (markdown)
@@ -1,9 +1,27 @@
|
|||||||
:construction: Work in progress, feel free to edit :construction:
|
:construction: Work in progress, feel free to edit :construction:
|
||||||
|
|
||||||
## JsonArray
|
## JsonArray
|
||||||
Create an empty JsonArray attached to the specified JsonBuffer.
|
|
||||||
You should not call this constructor directly.
|
Represents an array in a JSON object tree.
|
||||||
Instead, use JsonBuffer::createArray() or JsonBuffer::parseArray().
|
|
||||||
|
### Constructor
|
||||||
|
|
||||||
|
The constructor is private, you cannot instanciate a `JsonArray` directly, you have to use a `JsonBuffer`.
|
||||||
|
|
||||||
|
Because the actual memory location of a `JsonArray` is in the `JsonBuffer`, you always manipulate them through reference and you cannot copy them.
|
||||||
|
|
||||||
|
##### Example
|
||||||
|
|
||||||
|
```c++
|
||||||
|
StaticJsonBuffer<200> jsonBuffer;
|
||||||
|
|
||||||
|
// create an empty array
|
||||||
|
JsonArray& array1 = jsonBuffer.createArray();
|
||||||
|
|
||||||
|
// parse a JSON array
|
||||||
|
char json[] = "[1,2,3]";
|
||||||
|
JsonArray& array2 = jsonBuffer.parseArray(json);
|
||||||
|
```
|
||||||
|
|
||||||
### JsonArray::add()
|
### JsonArray::add()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user