JsonElement::get(const std::string_view key)
Function Usage
Returns a pointer to the JsonElement node corresponding to a key if the JsonElement node is not null and has a matching key.
Function Syntax
JsonElement *JsonElement::get(const std::string_view 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 JsonElement object corresponding to the key.
- 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 JsonElement structure.
Parent topic: Function Syntax