cJSON *get_json_description() { issue_json_t json; json.critical = underlying.critical; json.description = underlying.description; json.time = underlying.timestamp; json.type = underlying.type; cJSON *res = render_as_json(&json); cJSON_AddItemToObject(res, "location", render_as_json(&source)); return res; }
cJSON *render_as_json(directory_echo_wrapper_t<T> *target) { return render_as_json(&target->internal); }
std::string render_as_json_string(const T &t, const cxt_t cxt) { T copy = t; scoped_cJSON_t json(render_as_json(©, cxt)); return json.PrintUnformatted(); }