|
Greenbone Vulnerability Management Libraries 22.32.0
|
#include "json.h"

Go to the source code of this file.
Functions | |
| 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. | |
| int | gvm_json_obj_check_int (cJSON *obj, const gchar *key, int *val) |
| Get an int field from a JSON object. | |
| int | gvm_json_obj_int (cJSON *obj, const gchar *key) |
| Get an int field from a JSON object. | |
| int | gvm_json_obj_check_str (cJSON *obj, const gchar *key, gchar **val) |
| Get a string field from a JSON object. | |
| gchar * | gvm_json_obj_str (cJSON *obj, const gchar *key) |
| Get a string field from a JSON object. | |
| int gvm_json_obj_check_int | ( | cJSON * | obj, |
| const gchar * | key, | ||
| int * | val ) |
Get an int field from a JSON object.
| [in] | obj | Object |
| [in] | key | Field name. |
| [out] | val | Either NULL or a return location for the int (only set if int field exists). |
Definition at line 97 of file json.c.
Referenced by add_preferences_to_nvt(), Ensure(), Ensure(), Ensure(), and Ensure().

| int gvm_json_obj_check_str | ( | cJSON * | obj, |
| const gchar * | key, | ||
| gchar ** | val ) |
Get a string field from a JSON object.
| [in] | obj | Object |
| [in] | key | Field name. |
| [out] | val | Either NULL or a return location for the string (only set if string field exists). Freed by cJSON_Delete. |
Definition at line 142 of file json.c.
Referenced by add_preferences_to_nvt(), add_tags_to_nvt(), Ensure(), Ensure(), Ensure(), Ensure(), parse_references(), and parse_vt_json().

| double gvm_json_obj_double | ( | cJSON * | obj, |
| const gchar * | key ) |
Get a double field from a JSON object.
| [in] | obj | Object |
| [in] | key | Field name. |
Definition at line 75 of file json.c.
Referenced by add_tags_to_nvt(), Ensure(), and Ensure().

| int gvm_json_obj_int | ( | cJSON * | obj, |
| const gchar * | key ) |
Get an int field from a JSON object.
| [in] | obj | Object |
| [in] | key | Field name. |
Definition at line 120 of file json.c.
Referenced by Ensure(), Ensure(), and Ensure().

| gchar * gvm_json_obj_str | ( | cJSON * | obj, |
| const gchar * | key ) |
Get a string field from a JSON object.
| [in] | obj | Object |
| [in] | key | Field name. |
Definition at line 165 of file json.c.
Referenced by add_tags_to_nvt(), Ensure(), and Ensure().

| gchar * gvm_json_string_escape | ( | const char * | string, |
| gboolean | single_quote ) |
Escapes a string according to the JSON or JSONPath standard.
| [in] | string | The string to escape |
| [in] | single_quote | Whether to escape single quotes |
Definition at line 17 of file json.c.
Referenced by Ensure(), and gvm_json_path_string_add_elem().
