You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

json_object_private.h 1.4 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * $Id: json_object_private.h,v 1.3 2005/06/14 22:41:51 mclark Exp $
  3. *
  4. * Copyright Metaparadigm Pte. Ltd. 2004.
  5. * Michael Clark <michael@metaparadigm.com>
  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 (LGPL)
  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: http://www.gnu.org/
  16. *
  17. */
  18. #ifndef _json_object_private_h_
  19. #define _json_object_private_h_
  20. typedef void (json_object_delete_fn)(struct json_object *o);
  21. typedef int (json_object_to_json_string_fn)(struct json_object *o,
  22. struct printbuf *pb);
  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. /* CAW: added for ANSI C iteration correctness */
  40. struct json_object_iter
  41. {
  42. char *key;
  43. struct json_object *val;
  44. struct lh_entry *entry;
  45. };
  46. #endif

No Description

Contributors (1)