Initial Import
[profile/ivi/json-glib.git] / json-glib / json-gvariant.h
1 /* json-gvariant.h - JSON GVariant integration
2  *
3  * This file is part of JSON-GLib
4  * Copyright (C) 2007  OpenedHand Ltd.
5  * Copyright (C) 2009  Intel Corp.
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
19  *
20  * Author:
21  *   Eduardo Lima Mitev  <elima@igalia.com>
22  */
23
24 #ifndef __JSON_GVARIANT_H__
25 #define __JSON_GVARIANT_H__
26
27 #include <glib.h>
28 #include <json-glib/json-glib.h>
29
30 G_BEGIN_DECLS
31
32 JsonNode * json_gvariant_serialize        (GVariant *variant);
33 gchar *    json_gvariant_serialize_data   (GVariant *variant,
34                                            gsize    *length);
35
36 GVariant * json_gvariant_deserialize      (JsonNode     *json_node,
37                                            const gchar  *signature,
38                                            GError      **error);
39 GVariant * json_gvariant_deserialize_data (const gchar  *json,
40                                            gssize        length,
41                                            const gchar  *signature,
42                                            GError      **error);
43
44 G_END_DECLS
45
46 #endif /* __JSON_GVARIANT_H__ */