kw_delete()
#
The function kw_delete()
removes a value from a JSON dictionary based on a specified path.
Prototype
int kw_delete(
hgobj gobj,
json_t *kw,
const char *path
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
A handle to the gobj (generic object) that may be used for logging or context. |
|
|
A JSON dictionary from which the value will be deleted. |
|
|
The path to the value that should be removed from the dictionary. |
Return Value
Returns 0 on success, or -1 if the specified path does not exist.
Notes
If the path does not exist, an error is logged, and the function returns -1. The function does not support deleting values from JSON arrays.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples