A JSON object.
More...
#include <JSON.h>
|
cJSON * | m_node |
| The underlying cJSON node.
|
|
bool JsonObject::getBoolean |
( |
std::string |
name | ) |
|
Get the named boolean value from the object.
- Parameters
-
[in] | name | The name of the object property. |
- Returns
- The boolean value from the object.
double JsonObject::getDouble |
( |
std::string |
name | ) |
|
Get the named double value from the object.
- Parameters
-
[in] | name | The name of the object property. |
- Returns
- The double value from the object.
int JsonObject::getInt |
( |
std::string |
name | ) |
|
Get the named int value from the object.
- Parameters
-
[in] | name | The name of the object property. |
- Returns
- The int value from the object.
JsonObject JsonObject::getObject |
( |
std::string |
name | ) |
|
Get the named object value from the object.
- Parameters
-
[in] | name | The name of the object property. |
- Returns
- The object value from the object.
std::string JsonObject::getString |
( |
std::string |
name | ) |
|
Get the named string value from the object.
- Parameters
-
[in] | name | The name of the object property. |
- Returns
- The string value from the object.
void JsonObject::setArray |
( |
std::string |
name, |
|
|
JsonArray |
array |
|
) |
| |
Set the named array property.
- Parameters
-
[in] | name | The name of the property to add. |
[in] | array | The array to add to the object. |
- Returns
- N/A.
void JsonObject::setBoolean |
( |
std::string |
name, |
|
|
bool |
value |
|
) |
| |
Set the named boolean property.
- Parameters
-
[in] | name | The name of the property to add. |
[in] | value | The boolean to add to the object. |
- Returns
- N/A.
void JsonObject::setDouble |
( |
std::string |
name, |
|
|
double |
value |
|
) |
| |
Set the named double property.
- Parameters
-
[in] | name | The name of the property to add. |
[in] | value | The double to add to the object. |
- Returns
- N/A.
void JsonObject::setInt |
( |
std::string |
name, |
|
|
int |
value |
|
) |
| |
Set the named int property.
- Parameters
-
[in] | name | The name of the property to add. |
[in] | value | The int to add to the object. |
- Returns
- N/A.
void JsonObject::setObject |
( |
std::string |
name, |
|
|
JsonObject |
value |
|
) |
| |
Set the named object property.
- Parameters
-
[in] | name | The name of the property to add. |
[in] | value | The object to add to the object. |
- Returns
- N/A.
void JsonObject::setString |
( |
std::string |
name, |
|
|
std::string |
value |
|
) |
| |
Set the named string property.
- Parameters
-
[in] | name | The name of the property to add. |
[in] | value | The string to add to the object. |
- Returns
- N/A.
std::string JsonObject::toString |
( |
| ) |
|
Convert the JSON object to a string.
- Returns
- A JSON string representation of the object.
The documentation for this class was generated from the following files:
- lib/Commons/JSON.h
- lib/Commons/JSON.cpp