Simple JSON reader.
More...
Go to the source code of this file.
◆ G_LOG_DOMAIN
#define G_LOG_DOMAIN "libgvm util" |
◆ add_preferences_to_nvt()
static void add_preferences_to_nvt |
( |
nvti_t * | nvt, |
|
|
cJSON * | vt_obj ) |
|
static |
◆ add_tags_to_nvt()
static void add_tags_to_nvt |
( |
nvti_t * | nvt, |
|
|
cJSON * | tag_obj ) |
|
static |
◆ get_category_from_name()
static int get_category_from_name |
( |
const gchar * | cat | ) |
|
|
static |
Get the VT category type given the category as string.
- Parameters
-
cat | The category as string. |
- Returns
- Integer representing the category type.
◆ parse_references()
static void parse_references |
( |
nvti_t * | nvt, |
|
|
cJSON * | vt_obj ) |
|
static |
◆ parse_vt_json()
Parse a VT element given in json format.
- Parameters
-
[in] | parser | Json pull parser. |
[in] | event | Json pull event. |
[out] | nvt | The NVT Info structure to fill with the parsed data. |
- Returns
- 0 on success, 1 on end of feed, -1 on error. In case of success the nvti struct must be freed with nvti_free() by the caller.