diff options
author | Christian Grothoff <grothoff@gnunet.org> | 2021-07-26 16:32:34 +0200 |
---|---|---|
committer | Christian Grothoff <grothoff@gnunet.org> | 2021-07-26 16:32:34 +0200 |
commit | 90095d19b4da40e79dce43a31af398a8925bcc4a (patch) | |
tree | cd8b5eaf6073963fae7c428d4ce0797253e88fd5 /src/include/gnunet_json_lib.h | |
parent | 089fe579a913bda293d2c1579972a64657242660 (diff) | |
download | gnunet-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.h | 21 |
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 |