From 18c804100caba536db0732266e6027123c525cda Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 1 Aug 2021 20:56:14 +0200 Subject: -more json_pack removal --- src/anastasis/anastasis-gtk_handle-method-post.c | 33 ++++++++++++------------ 1 file changed, 16 insertions(+), 17 deletions(-) (limited to 'src/anastasis/anastasis-gtk_handle-method-post.c') diff --git a/src/anastasis/anastasis-gtk_handle-method-post.c b/src/anastasis/anastasis-gtk_handle-method-post.c index 5269548..5ad954c 100644 --- a/src/anastasis/anastasis-gtk_handle-method-post.c +++ b/src/anastasis/anastasis-gtk_handle-method-post.c @@ -86,23 +86,22 @@ anastasis_gtk_b_post_dialog_response_cb (GtkDialog *dialog, { json_t *addr; - addr = json_pack ("{s:s,s:s,s:s,s:s,s:s}", - "full_name", - gt (builder, - "anastasis_gtk_b_post_dialog_full_name_entry"), - "street", - gt (builder, - "anastasis_gtk_b_post_dialog_street_entry"), - "city", - gt (builder, - "anastasis_gtk_b_post_dialog_city_entry"), - "postcode", - gt (builder, - "anastasis_gtk_b_post_dialog_postcode_entry"), - "country", - gt (builder, - "anastasis_gtk_b_post_dialog_country_entry")); - GNUNET_assert (NULL != addr); + addr = GNUNET_JSON_PACK ( + GNUNET_JSON_pack_string ("full_name", + gt (builder, + "anastasis_gtk_b_post_dialog_full_name_entry")), + GNUNET_JSON_pack_string ("street", + gt (builder, + "anastasis_gtk_b_post_dialog_street_entry")), + GNUNET_JSON_pack_string ("city", + gt (builder, + "anastasis_gtk_b_post_dialog_city_entry")), + GNUNET_JSON_pack_string ("postcode", + gt (builder, + "anastasis_gtk_b_post_dialog_postcode_entry")), + GNUNET_JSON_pack_string ("country", + gt (builder, + "anastasis_gtk_b_post_dialog_country_entry"))); addr_s = json_dumps (addr, JSON_COMPACT | JSON_SORT_KEYS); json_decref (addr); -- cgit v1.2.3