gobj_read_attr()
#
Retrieves the value of a specified attribute from the given hgobj
. The function returns a JSON object representing the attribute value.
Prototype
json_t *gobj_read_attr(
hgobj gobj,
const char *name,
hgobj src
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
The |
|
|
The name of the attribute to retrieve. |
|
|
The source |
Return Value
A JSON object containing the attribute value. If the attribute is not found, a warning is logged and NULL is returned.
Notes
If the attribute exists, the function returns a reference to the JSON object stored in the hgobj
. The caller should not modify or free the returned JSON object.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples