Go to the source code of this file.
|
gchar * | gvm_json_string_escape (const char *string, gboolean single_quote) |
| Escapes a string according to the JSON or JSONPath standard.
|
|
double | gvm_json_obj_double (cJSON *obj, const gchar *key) |
| Get a double field from a JSON object.
|
|
gchar * | gvm_json_obj_str (cJSON *obj, const gchar *key) |
| Get a string field from a JSON object.
|
|
◆ gvm_json_obj_double()
double gvm_json_obj_double |
( |
cJSON * | obj, |
|
|
const gchar * | key ) |
Get a double field from a JSON object.
- Parameters
-
[in] | obj | Object |
[in] | key | Field name. |
- Returns
- A double.
◆ gvm_json_obj_str()
gchar * gvm_json_obj_str |
( |
cJSON * | obj, |
|
|
const gchar * | key ) |
Get a string field from a JSON object.
- Parameters
-
[in] | obj | Object |
[in] | key | Field name. |
- Returns
- A string. Will be freed by cJSON_Delete.
◆ gvm_json_string_escape()
gchar * gvm_json_string_escape |
( |
const char * | string, |
|
|
gboolean | single_quote ) |
Escapes a string according to the JSON or JSONPath standard.
- Parameters
-
[in] | string | The string to escape |
[in] | single_quote | Whether to escape single quotes |
- Returns
- The escaped string