GsonObject::getAsJsonObject(const std::string &key)
Function Usage
Obtains the GsonObject child node corresponding to the key on the current node.
Function Syntax
GsonObject *GsonObject::getAsJsonObject(const std::string &key);
Parameters
Parameter |
Description |
Value Range |
Input/Output |
|---|---|---|---|
key |
Key of the node to be obtained. |
Valid string |
Input |
Return Value
- Success: a pointer to the GsonObject child node corresponding to the key on the current node.
- Failure: a null pointer if the node is null, or a null node if the key does not exist on the node.
You must use delete to release the returned pointer to the GsonObject structure.
Parent topic: Function Syntax