File: json.h

package info (click to toggle)
gvm-libs 22.35.4-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,980 kB
  • sloc: ansic: 39,095; makefile: 26
file content (32 lines) | stat: -rw-r--r-- 585 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* SPDX-FileCopyrightText: 2024 Greenbone AG
 *
 * SPDX-License-Identifier: GPL-2.0-or-later
 */

#ifndef _GVM_UTIL_JSON_H
#define _GVM_UTIL_JSON_H

#define _GNU_SOURCE

#include <cjson/cJSON.h>
#include <glib.h>

gchar *
gvm_json_string_escape (const char *, gboolean);

double
gvm_json_obj_double (cJSON *, const gchar *);

int
gvm_json_obj_check_int (cJSON *, const gchar *, int *);

int
gvm_json_obj_int (cJSON *, const gchar *);

int
gvm_json_obj_check_str (cJSON *, const gchar *, gchar **);

gchar *
gvm_json_obj_str (cJSON *, const gchar *);

#endif /* not _GVM_UTIL_JSON_H */