diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-08-01 20:56:14 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-08-01 20:56:14 +0200 |
commit | 18c804100caba536db0732266e6027123c525cda (patch) | |
tree | 2a7370d1be8a54ba593cefaa98e69d982f122b5f /src/anastasis/anastasis-gtk_handle-method-post.c | |
parent | 3c36cb46328eeeea43b59544da08c463ed5a2c78 (diff) | |
download | anastasis-gtk-18c804100caba536db0732266e6027123c525cda.tar.gz anastasis-gtk-18c804100caba536db0732266e6027123c525cda.tar.bz2 anastasis-gtk-18c804100caba536db0732266e6027123c525cda.zip |
-more json_pack removal
Diffstat (limited to 'src/anastasis/anastasis-gtk_handle-method-post.c')
-rw-r--r-- | src/anastasis/anastasis-gtk_handle-method-post.c | 33 |
1 files changed, 16 insertions, 17 deletions
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); |