X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-reply.c;h=e60a264b5d30acf8cec96412f17e150789e43c5c;hp=e42ba79fcb443796a03cfb150a01d45899ab8f4e;hb=58b222d597c4b2e8b8bc0b251929ead60eb29bf9;hpb=7b2c4481f10b19a6847e6064da5ee86f9999a0d5 diff --git a/notmuch-reply.c b/notmuch-reply.c index e42ba79f..e60a264b 100644 --- a/notmuch-reply.c +++ b/notmuch-reply.c @@ -614,20 +614,20 @@ notmuch_reply_format_json(void *ctx, return 1; sp = sprinter_json_create (ctx, stdout); + sp->begin_map (sp); /* The headers of the reply message we've created */ - printf ("{\"reply-headers\": "); - format_headers_json (ctx, reply, TRUE); + sp->map_key (sp, "reply-headers"); + format_headers_json (sp, reply, TRUE); g_object_unref (G_OBJECT (reply)); reply = NULL; /* Start the original */ - printf (", \"original\": "); - - format_part_json (ctx, node, TRUE, TRUE); + sp->map_key (sp, "original"); + format_part_json (ctx, sp, node, TRUE, TRUE); /* End */ - printf ("}\n"); + sp->end (sp); notmuch_message_destroy (message); return 0;