ArduinoJson: API Reference

JsonBuffer::createArray()

Description

Allocates an empty JsonArray.

Signature
JsonArray& createArray();
Return value

Returns a reference to the new JsonArray or JsonArray::invalid() if the allocation fails.

Example
StaticJsonBuffer<200> jsonBuffer;
JsonArray& array = jsonBuffer.createArray();
array.add("hello");
array.add("world");
Fork me on GitHub