A JSON array.
More...
#include <JSON.h>
|
cJSON * | m_node |
| The underlying cJSON node.
|
|
void JsonArray::addBoolean |
( |
bool |
value | ) |
|
Add a boolean value to the array.
- Parameters
-
[in] | value | The boolean value to add to the array. |
void JsonArray::addDouble |
( |
double |
value | ) |
|
Add a double value to the array.
- Parameters
-
[in] | value | The double value to add to the array. |
void JsonArray::addInt |
( |
int |
value | ) |
|
Add an int value to the array.
- Parameters
-
[in] | value | The int value to add to the array. |
Add an object value to the array.
- Parameters
-
[in] | value | The object value to add to the array. |
void JsonArray::addString |
( |
std::string |
value | ) |
|
Add a string value to the array.
- Parameters
-
[in] | value | The string value to add to the array. |
bool JsonArray::getBoolean |
( |
int |
item | ) |
|
Get the indexed boolean value from the array.
- Parameters
-
[in] | item | The index of the array to retrieve. |
- Returns
- The boolean value at the given index.
double JsonArray::getDouble |
( |
int |
item | ) |
|
Get the indexed double value from the array.
- Parameters
-
[in] | item | The index of the array to retrieve. |
- Returns
- The double value at the given index.
int JsonArray::getInt |
( |
int |
item | ) |
|
Get the indexed int value from the array.
- Parameters
-
[in] | item | The index of the array to retrieve. |
- Returns
- The int value at the given index.
Get the indexed object value from the array.
- Parameters
-
[in] | item | The index of the array to retrieve. |
- Returns
- The object value at the given index.
std::string JsonArray::getString |
( |
int |
item | ) |
|
Get the indexed object value from the array.
- Parameters
-
[in] | item | The index of the array to retrieve. |
- Returns
- The object value at the given index.
std::size_t JsonArray::size |
( |
| ) |
|
Get the number of elements from the array.
- Returns
- The int value that represents the number of elements.
std::string JsonArray::toString |
( |
| ) |
|
Convert the JSON array to a string.
- Returns
- A JSON string representation of the array.
The documentation for this class was generated from the following files:
- lib/Commons/JSON.h
- lib/Commons/JSON.cpp