blob: 1786bb5864a0973df95626668d3140d268c92164 [file] [log] [blame]
Alexander Graf190c8822015-01-22 15:01:37 +01001/*
2 * QEMU JSON writer
3 *
4 * Copyright Alexander Graf
5 *
6 * Authors:
7 * Alexander Graf <agraf@suse.de>
8 *
9 * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
10 * See the COPYING.LIB file in the top-level directory.
11 *
12 */
13#ifndef QEMU_QJSON_H
14#define QEMU_QJSON_H
15
Alexander Graf190c8822015-01-22 15:01:37 +010016QJSON *qjson_new(void);
Markus Armbrusterb72fe9e2016-05-04 18:49:18 +020017void qjson_destroy(QJSON *json);
Alexander Graf190c8822015-01-22 15:01:37 +010018void json_prop_str(QJSON *json, const char *name, const char *str);
19void json_prop_int(QJSON *json, const char *name, int64_t val);
20void json_end_array(QJSON *json);
21void json_start_array(QJSON *json, const char *name);
22void json_end_object(QJSON *json);
23void json_start_object(QJSON *json, const char *name);
24const char *qjson_get_str(QJSON *json);
25void qjson_finish(QJSON *json);
26
Marc-André Lureau91490582019-09-12 16:25:09 +040027G_DEFINE_AUTOPTR_CLEANUP_FUNC(QJSON, qjson_destroy)
28
Alexander Graf190c8822015-01-22 15:01:37 +010029#endif /* QEMU_QJSON_H */