addObject
JSON::Node::addObject
Adds an element to an Array Node or to certain key in an Object Node.
Declaration
void addObject(const std::string& childName, Node* childNode);
Parameters
Name |
Type |
Description |
---|---|---|
childName |
const std::string& |
The name of the child to add to the JSON::Node. |
childNode |
The memory address of the JSON::Node to add as a child. |
Returns
None.
Notes
This function can only be called on a JSON::Node with the Object JSON::Type.
Declaration
void addObject(Node* element);
Parameters
Name |
Type |
Description |
---|---|---|
childNode |
The memory address of the JSON::Node to add as a child. |
Returns
None.
Notes
This function can only be called on a JSON::Node with the Array JSON::Type.
childNode
is added at the end of the list.