]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-show.c
show: Use consistent header ordering in the JSON format
[notmuch] / notmuch-show.c
index 868b2cd8ad69817079e3a8c82529443039a91e3c..9ca988207bfe232ee6384e477b5527c4ae943faa 100644 (file)
@@ -328,6 +328,9 @@ format_headers_message_part_json (GMimeMessage *message)
     const char *recipients_string;
 
     printf ("%s: %s",
+           json_quote_str (ctx_quote, "Subject"),
+           json_quote_str (ctx_quote, g_mime_message_get_subject (message)));
+    printf (", %s: %s",
            json_quote_str (ctx_quote, "From"),
            json_quote_str (ctx_quote, g_mime_message_get_sender (message)));
     recipients = g_mime_message_get_recipients (message, GMIME_RECIPIENT_TYPE_TO);
@@ -342,9 +345,6 @@ format_headers_message_part_json (GMimeMessage *message)
        printf (", %s: %s",
                json_quote_str (ctx_quote, "Cc"),
                json_quote_str (ctx_quote, recipients_string));
-    printf (", %s: %s",
-           json_quote_str (ctx_quote, "Subject"),
-           json_quote_str (ctx_quote, g_mime_message_get_subject (message)));
     printf (", %s: %s",
            json_quote_str (ctx_quote, "Date"),
            json_quote_str (ctx_quote, g_mime_message_get_date_as_string (message)));