kw_get_str()
#
Get the value of a key as a string from a JSON object. Works with json_t *
.
Prototype
PUBLIC const char *kw_get_str(
json_t *kw,
const char *key,
const char *default_value
);
Parameters
Key |
Type |
Description |
---|---|---|
|
The JSON object to query. |
|
|
|
The key whose value will be retrieved as a string. |
|
|
The default value to return if the key does not exist or is not a string. |
Return Value
Returns the string value of the key, or default_value
if the key does not exist or is not a string.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples