Esempio n. 1
0
    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;
    }
Esempio n. 2
0
cJSON *render_as_json(directory_echo_wrapper_t<T> *target) {
    return render_as_json(&target->internal);
}
Esempio n. 3
0
std::string render_as_json_string(const T &t, const cxt_t cxt) {
    T copy = t;
    scoped_cJSON_t json(render_as_json(&copy, cxt));
    return json.PrintUnformatted();
}