1 /* json-utils.h - JSON utility API 2 * 3 * This file is part of JSON-GLib 4 * Copyright 2015 Emmanuele Bassi 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either 9 * version 2.1 of the License, or (at your option) any later version. 10 * 11 * This library is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public 17 * License along with this library. If not, see <http://www.gnu.org/licenses/>. 18 */ 19 20 #ifndef __JSON_UTILS_H__ 21 #define __JSON_UTILS_H__ 22 23 #if !defined(__JSON_GLIB_INSIDE__) && !defined(JSON_COMPILATION) 24 #error "Only <json-glib/json-glib.h> can be included directly." 25 #endif 26 27 #include <json-glib/json-types.h> 28 29 G_BEGIN_DECLS 30 31 JSON_AVAILABLE_IN_1_2 32 JsonNode * json_from_string (const char *str, 33 GError **error); 34 JSON_AVAILABLE_IN_1_2 35 char * json_to_string (JsonNode *node, 36 gboolean pretty); 37 38 G_END_DECLS 39 40 #endif /* __JSON_UTILS_H__ */ 41