Michael Clark | f0d0888 | 2007-03-13 08:26:18 +0000 | [diff] [blame^] | 1 | #ifndef _json_object_private_h_ |
| 2 | #define _json_object_private_h_ |
| 3 | |
| 4 | typedef void (json_object_delete_fn)(struct json_object *o); |
| 5 | typedef int (json_object_to_json_string_fn)(struct json_object *o, |
| 6 | struct printbuf *pb); |
| 7 | |
| 8 | struct json_object |
| 9 | { |
| 10 | enum json_type o_type; |
| 11 | json_object_delete_fn *_delete; |
| 12 | json_object_to_json_string_fn *_to_json_string; |
| 13 | int _ref_count; |
| 14 | struct printbuf *_pb; |
| 15 | union data { |
| 16 | boolean c_boolean; |
| 17 | double c_double; |
| 18 | int c_int; |
| 19 | struct lh_table *c_object; |
| 20 | struct array_list *c_array; |
| 21 | char *c_string; |
| 22 | } o; |
| 23 | }; |
| 24 | |
| 25 | #endif |