mu: support json output directly

Allow for dumping json directly from the Sexp structures, so we don't
need any external libs (i.e. json-glib) anymore.
This commit is contained in:
Dirk-Jan C. Binnema
2020-10-26 18:39:56 +02:00
parent f2e87ea2d4
commit d2aa1f91b0
10 changed files with 93 additions and 66 deletions

View File

@ -595,10 +595,6 @@ char* mu_str_flags (MuFlags flags)
struct _MuMsgIterThreadInfo;
#ifdef HAVE_JSON_GLIB
struct _JsonNode; /* forward declaration */
/**
* convert the msg to json
*
@ -612,13 +608,11 @@ struct _JsonNode; /* forward declaration */
* - MU_MSG_OPTION_EXTRACT_IMAGES: extract image attachments as temporary
* files and include links to those in the sexp
*
* @return a string with the sexp (free with g_free) or NULL in case of error
* @return a string with the json (free with g_free) or NULL in case of error
*/
struct _JsonNode* mu_msg_to_json (MuMsg *msg, unsigned docid,
char* mu_msg_to_json (MuMsg *msg, unsigned docid,
const struct _MuMsgIterThreadInfo *ti,
MuMsgOptions ops) G_GNUC_WARN_UNUSED_RESULT;
#endif /*HAVE_JSON_GLIB*/
/**
* convert the msg to a Lisp symbolic expression (for further processing in