InternetAddressList *recipients;
const char *recipients_string;
- printf ("%s: %s",
+ printf ("{%s: %s",
json_quote_str (local, "Subject"),
json_quote_str (local, g_mime_message_get_subject (message)));
printf (", %s: %s",
printf (", %s: %s",
json_quote_str (local, "Cc"),
json_quote_str (local, recipients_string));
- printf (", %s: %s",
+ printf (", %s: %s}",
json_quote_str (local, "Date"),
json_quote_str (local, g_mime_message_get_date_as_string (message)));
static void
format_part_sigstatus_json (GMimeSignatureList *siglist)
{
- printf (", \"sigstatus\": [");
+ printf ("[");
if (!siglist) {
printf ("]");
static void
format_part_sigstatus_json (const GMimeSignatureValidity* validity)
{
- printf (", \"sigstatus\": [");
+ printf ("[");
if (!validity) {
printf ("]");
printf ("{");
format_message_json (ctx, node->envelope_file);
- printf ("\"headers\": {");
+ printf ("\"headers\": ");
format_headers_json (ctx, GMIME_MESSAGE (node->part));
- printf ("}");
printf (", \"body\": [");
format_part_json (ctx, mime_node_child (node, 0), first);
}
if (node->verify_attempted) {
+ printf (", \"sigstatus\": ");
#ifdef GMIME_ATLEAST_26
format_part_sigstatus_json (node->sig_list);
#else
g_object_unref (stream_memory);
if (GMIME_IS_MESSAGE (node->part)) {
- printf ("\"headers\": {");
+ printf ("\"headers\": ");
format_headers_json (local, GMIME_MESSAGE (node->part));
- printf ("}");
printf (", \"body\": [");
}