aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_json_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <grothoff@gnunet.org>2021-07-26 16:32:34 +0200
committerChristian Grothoff <grothoff@gnunet.org>2021-07-26 16:32:34 +0200
commit90095d19b4da40e79dce43a31af398a8925bcc4a (patch)
treecd8b5eaf6073963fae7c428d4ce0797253e88fd5 /src/include/gnunet_json_lib.h
parent089fe579a913bda293d2c1579972a64657242660 (diff)
downloadgnunet-90095d19b4da40e79dce43a31af398a8925bcc4a.tar.gz
gnunet-90095d19b4da40e79dce43a31af398a8925bcc4a.zip
implement typed JSON packer
Diffstat (limited to 'src/include/gnunet_json_lib.h')
-rw-r--r--src/include/gnunet_json_lib.h21
1 files changed, 2 insertions, 19 deletions
diff --git a/src/include/gnunet_json_lib.h b/src/include/gnunet_json_lib.h
index 27a4a20cd..144ddb64a 100644
--- a/src/include/gnunet_json_lib.h
+++ b/src/include/gnunet_json_lib.h
@@ -553,26 +553,9 @@ struct GNUNET_JSON_PackSpec
553 const char *field_name; 553 const char *field_name;
554 554
555 /** 555 /**
556 * Function that will do the packing. 556 * Object to pack.
557 */ 557 */
558 GNUNET_JSON_PackCallback *packer; 558 json_t *object;
559
560 /**
561 * Closure for @e packer.
562 */
563 void *packer_cls;
564
565 /**
566 * Pointer to be provided to the packer.
567 */
568 const void *value_ptr;
569
570 /**
571 * Numeric value for the packer, could be
572 * the length of the data in @e value_ptr,
573 * or something different depending on the type.
574 */
575 uint64_t value_num;
576 559
577 /** 560 /**
578 * True if a NULL (or 0) argument is allowed. In this 561 * True if a NULL (or 0) argument is allowed. In this