From 41bbc3b3d8cf2ac9d90cd41b584aea8dac11a9e5 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 1 Aug 2021 18:57:26 +0200 Subject: -more json_pack fixes --- .../taler-merchant-httpd_private-get-tips.c | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/backend/taler-merchant-httpd_private-get-tips.c') diff --git a/src/backend/taler-merchant-httpd_private-get-tips.c b/src/backend/taler-merchant-httpd_private-get-tips.c index 60e4900e..e222daae 100644 --- a/src/backend/taler-merchant-httpd_private-get-tips.c +++ b/src/backend/taler-merchant-httpd_private-get-tips.c @@ -1,6 +1,6 @@ /* This file is part of TALER - (C) 2020 Taler Systems SA + (C) 2020-2021 Taler Systems SA TALER is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -41,14 +41,13 @@ add_tip (void *cls, GNUNET_assert (0 == json_array_append_new ( pa, - json_pack ( - "{s:I, s:o, s:o}", - "row_id", - row_id, - "tip_id", - GNUNET_JSON_from_data_auto (&tip_id), - "tip_amount", - TALER_JSON_from_amount (&amount)))); + GNUNET_JSON_PACK ( + GNUNET_JSON_pack_uint64 ("row_id", + row_id), + GNUNET_JSON_pack_data_auto ("tip_id", + &tip_id), + TALER_JSON_pack_amount ("tip_amount", + &amount)))); } @@ -149,8 +148,9 @@ TMH_private_get_tips (const struct TMH_RequestHandler *rh, "tips"); } - return TALER_MHD_reply_json_pack (connection, - MHD_HTTP_OK, - "{s:o}", - "tips", pa); + return TALER_MHD_REPLY_JSON_PACK ( + connection, + MHD_HTTP_OK, + GNUNET_JSON_pack_array_steal ("tips", + pa)); } -- cgit v1.2.3