root/src/json-lib/json_object_private.h

Revision efa9375336eec306ede14a9a1032985a71482810, 1.1 kB (checked in by Theo Schlossnagle <jesus@omniti.com>, 4 years ago)

refs #294 resmon no support arbitrary json objects

  • Property mode set to 100644
Line 
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
23 struct json_object
24 {
25   enum json_type o_type;
26   json_object_delete_fn *_delete;
27   json_object_to_json_string_fn *_to_json_string;
28   int _ref_count;
29   struct printbuf *_pb;
30   union data {
31     boolean c_boolean;
32     double c_double;
33     int c_int;
34     struct lh_table *c_object;
35     struct array_list *c_array;
36     char *c_string;
37   } o;
38 };
39
40 /* CAW: added for ANSI C iteration correctness */
41 struct json_object_iter
42 {
43         char *key;
44         struct json_object *val;
45         struct lh_entry *entry;
46 };
47
48 #ifdef __cplusplus
49 }
50 #endif
51
52 #endif
Note: See TracBrowser for help on using the browser.