sprint_message_hash(
    gpointer gkey,
    gpointer gvalue,
    gpointer user_data)
{
    char *key = gkey;
    json_value_t *value = gvalue;
    message_hash_t *mh = user_data;
    char *result_value = sprint_message_value((json_value_t *)value);

    if (!mh->first) {
	g_string_append(mh->r, ",\n");
    } else {
	mh->first = 0;
    }
    g_string_append_printf(mh->r,"%*c\"%s\" : %s", message_indent, ' ', (char *)key, result_value);
    g_free(result_value);
}
sprint_message_hash(
    gpointer gkey,
    gpointer gvalue,
    gpointer user_data)
{
    char *key = gkey;
    json_value_t *value = gvalue;
    message_hash_t *mh = user_data;
    char *result_value = sprint_message_value((json_value_t *)value);

    if (!mh->first) {
	g_string_append(mh->r, ",\n");
    } else {
	mh->first = 0;
    }
    g_string_append_printf(mh->r,"%*c\"%s\" : %s", message_indent, ' ', (char *)key, result_value);
    g_free(result_value);
}