summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_link.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-07-30 17:24:16 +0200
committerChristian Grothoff <christian@grothoff.org>2021-07-30 17:24:18 +0200
commitcbb905a9aae891c6c3af5ead5709951c4f038a2a (patch)
treea4d2ef3818c58924329e9db8eb588ac07aec129c /src/exchange/taler-exchange-httpd_link.c
parent7e409c37ab6f339811441c8803109afb218d0854 (diff)
downloadexchange-cbb905a9aae891c6c3af5ead5709951c4f038a2a.tar.gz
exchange-cbb905a9aae891c6c3af5ead5709951c4f038a2a.tar.bz2
exchange-cbb905a9aae891c6c3af5ead5709951c4f038a2a.zip
-eliminate more json_pack format strings
Diffstat (limited to 'src/exchange/taler-exchange-httpd_link.c')
-rw-r--r--src/exchange/taler-exchange-httpd_link.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/src/exchange/taler-exchange-httpd_link.c b/src/exchange/taler-exchange-httpd_link.c
index b93d2e718..a39e58641 100644
--- a/src/exchange/taler-exchange-httpd_link.c
+++ b/src/exchange/taler-exchange-httpd_link.c
@@ -81,15 +81,13 @@ handle_link_data (void *cls,
{
json_t *obj;
- obj = json_pack ("{s:o, s:o, s:o}",
- "denom_pub",
- GNUNET_JSON_from_rsa_public_key (
- pos->denom_pub.rsa_public_key),
- "ev_sig",
- GNUNET_JSON_from_rsa_signature
- (pos->ev_sig.rsa_signature),
- "link_sig",
- GNUNET_JSON_from_data_auto (&pos->orig_coin_link_sig));
+ obj = GNUNET_JSON_PACK (
+ GNUNET_JSON_pack_rsa_public_key ("denom_pub",
+ pos->denom_pub.rsa_public_key),
+ GNUNET_JSON_pack_rsa_signature ("ev_sig",
+ pos->ev_sig.rsa_signature),
+ GNUNET_JSON_pack_data_auto ("link_sig",
+ &pos->orig_coin_link_sig));
if ( (NULL == obj) ||
(0 !=
json_array_append_new (list,
@@ -102,11 +100,11 @@ handle_link_data (void *cls,
{
json_t *root;
- root = json_pack ("{s:o, s:o}",
- "new_coins",
- list,
- "transfer_pub",
- GNUNET_JSON_from_data_auto (transfer_pub));
+ root = GNUNET_JSON_PACK (
+ GNUNET_JSON_pack_array_steal ("new_coins",
+ list),
+ GNUNET_JSON_pack_data_auto ("transfer_pub",
+ transfer_pub));
if ( (NULL == root) ||
(0 !=
json_array_append_new (ctx->mlist,