Added a changelog entry.
[profile/ivi/json-c.git] / json_object_private.h
1 /*
2  * $Id: json_object_private.h,v 1.4 2006/01/26 02:16:28 mclark Exp $
3  *
4  * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
5  * Michael Clark <michael@metaparadigm.com>
6  *
7  * This library is free software; you can redistribute it and/or modify
8  * it under the terms of the MIT license. See COPYING for details.
9  *
10  */
11
12 #ifndef _json_object_private_h_
13 #define _json_object_private_h_
14
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18
19 typedef void (json_object_delete_fn)(struct json_object *o);
20 typedef int (json_object_to_json_string_fn)(struct json_object *o,
21                                                 struct printbuf *pb,
22                                                 int level,
23                                                 int flags);
24
25 struct json_object
26 {
27   enum json_type o_type;
28   json_object_delete_fn *_delete;
29   json_object_to_json_string_fn *_to_json_string;
30   int _ref_count;
31   struct printbuf *_pb;
32   union data {
33     json_bool c_boolean;
34     double c_double;
35     int64_t c_int64;
36     struct lh_table *c_object;
37     struct array_list *c_array;
38     struct {
39         char *str;
40         int len;
41     } c_string;
42   } o;
43 };
44
45 #ifdef __cplusplus
46 }
47 #endif
48
49 #endif