コード例 #1
0
ファイル: local_to_global.hpp プロジェクト: B-sound/rethinkdb
    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;
    }
コード例 #2
0
ファイル: metadata.hpp プロジェクト: AVGP/rethinkdb
cJSON *render_as_json(directory_echo_wrapper_t<T> *target) {
    return render_as_json(&target->internal);
}
コード例 #3
0
ファイル: json_adapter.hpp プロジェクト: AVGP/rethinkdb
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();
}