- reply = afb_msg_json_reply(status, info, resp, &hreq->xreq.context, reqid);
-
- response = MHD_create_response_from_callback((uint64_t)strlen(json_object_to_json_string_ext(reply, JSON_C_TO_STRING_PLAIN)), SIZE_RESPONSE_BUFFER, (void*)send_json_cb, reply, (void*)json_object_put);
- afb_hreq_reply(hreq, retcode, response, NULL);
-}
-
-static void req_fail(struct afb_xreq *xreq, const char *status, const char *info)
-{
- struct afb_hreq *hreq = CONTAINER_OF_XREQ(struct afb_hreq, xreq);
- req_reply(hreq, MHD_HTTP_OK, status, info, NULL);
-}
-
-static void req_success(struct afb_xreq *xreq, json_object *obj, const char *info)
-{
- struct afb_hreq *hreq = CONTAINER_OF_XREQ(struct afb_hreq, xreq);
- req_reply(hreq, MHD_HTTP_OK, "success", info, obj);
+ response = MHD_create_response_from_callback((uint64_t)strlen(json_object_to_json_string_ext(reply, JSON_C_TO_STRING_PLAIN|JSON_C_TO_STRING_NOSLASHESCAPE)), SIZE_RESPONSE_BUFFER, (void*)send_json_cb, reply, (void*)json_object_put);
+ afb_hreq_reply(hreq, MHD_HTTP_OK, response, NULL);