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_pointer_private.h 1.1 kB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Copyright (c) 2023 Eric Hawicz
  3. *
  4. * This library is free software; you can redistribute it and/or modify
  5. * it under the terms of the MIT license. See COPYING for details.
  6. */
  7. /**
  8. * @file
  9. * @brief Do not use, json-c internal, may be changed or removed at any time.
  10. */
  11. #ifndef _json_pointer_private_h_
  12. #define _json_pointer_private_h_
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. struct json_pointer_get_result {
  17. struct json_object *parent;
  18. struct json_object *obj;
  19. union {
  20. const char *key;
  21. uint32_t index;
  22. } id;
  23. };
  24. int json_pointer_get_internal(struct json_object *obj, const char *path,
  25. struct json_pointer_get_result *res);
  26. typedef int(*json_pointer_array_set_cb)(json_object *parent, size_t idx,
  27. json_object *value, void *priv);
  28. int json_pointer_set_with_array_cb(struct json_object **obj, const char *path,
  29. struct json_object *value,
  30. json_pointer_array_set_cb array_set_cb, void *priv);
  31. #ifdef __cplusplus
  32. }
  33. #endif
  34. #endif