mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-08-23 22:41:13 +02:00
Updated API Reference (markdown)
@@ -1,9 +1,27 @@
|
||||
:construction: Work in progress, feel free to edit :construction:
|
||||
|
||||
## JsonArray
|
||||
Create an empty JsonArray attached to the specified JsonBuffer.
|
||||
You should not call this constructor directly.
|
||||
Instead, use JsonBuffer::createArray() or JsonBuffer::parseArray().
|
||||
|
||||
Represents an array in a JSON object tree.
|
||||
|
||||
### 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()
|
||||
|
||||
|
Reference in New Issue
Block a user