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.0 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. #ifndef _json_object_private_h_
  12. #define _json_object_private_h_
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. typedef void (json_object_delete_fn)(struct json_object *o);
  17. typedef int (json_object_to_json_string_fn)(struct json_object *o,
  18. struct printbuf *pb,
  19. int level,
  20. int flags);
  21. struct json_object
  22. {
  23. enum json_type o_type;
  24. json_object_delete_fn *_delete;
  25. json_object_to_json_string_fn *_to_json_string;
  26. int _ref_count;
  27. struct printbuf *_pb;
  28. union data {
  29. json_bool c_boolean;
  30. double c_double;
  31. int64_t c_int64;
  32. struct lh_table *c_object;
  33. struct array_list *c_array;
  34. struct {
  35. char *str;
  36. int len;
  37. } c_string;
  38. } o;
  39. };
  40. #ifdef __cplusplus
  41. }
  42. #endif
  43. #endif