Greenbone Vulnerability Management Libraries 22.17.0
json.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2024 Greenbone AG
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later
4 */
5
6#ifndef _GVM_JSON_H
7#define _GVM_JSON_H
8
9#define _GNU_SOURCE
10
11#include <cjson/cJSON.h>
12#include <glib.h>
13
14gchar *
15gvm_json_string_escape (const char *, gboolean);
16
17double
18gvm_json_obj_double (cJSON *, const gchar *);
19
20gchar *
21gvm_json_obj_str (cJSON *, const gchar *);
22
23#endif /* _GVM_JSON_H */
gchar * gvm_json_string_escape(const char *, gboolean)
Escapes a string according to the JSON or JSONPath standard.
Definition json.c:17
gchar * gvm_json_obj_str(cJSON *, const gchar *)
Get a string field from a JSON object.
Definition json.c:95
double gvm_json_obj_double(cJSON *, const gchar *)
Get a double field from a JSON object.
Definition json.c:75