summaryrefslogtreecommitdiff
path: root/src/anastasis/anastasis-gtk_handle-method-post.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/anastasis/anastasis-gtk_handle-method-post.c')
-rw-r--r--src/anastasis/anastasis-gtk_handle-method-post.c33
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);