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:
@ -478,5 +478,14 @@ mu_msg_to_sexp (MuMsg *msg, unsigned docid, const MuMsgIterThreadInfo *ti,
|
||||
MuMsgOptions opts)
|
||||
{
|
||||
return g_strdup (Mu::msg_to_sexp (msg, docid, ti, opts)
|
||||
.to_string().c_str());
|
||||
.to_sexp_string().c_str());
|
||||
}
|
||||
|
||||
|
||||
char*
|
||||
mu_msg_to_json (MuMsg *msg, unsigned docid, const MuMsgIterThreadInfo *ti,
|
||||
MuMsgOptions opts)
|
||||
{
|
||||
return g_strdup (Mu::msg_to_sexp (msg, docid, ti, opts)
|
||||
.to_json_string().c_str());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user