Debian Codegraph @

mtxclient/lib/structs/events/tombstone.cpp

raw symbols SCIP
1 #include <nlohmann/json.hpp>
2
3 using json = nlohmann::json;
4
5 #include "mtx/events/tombstone.hpp"
6
7 namespace mtx {
8 namespace events {
9 namespace state {
10
11 void
12 from_json(const json &obj, Tombstone &content)
13 {
14 content.body = obj.value("body", "");
15 content.replacement_room = obj.value("replacement_room", "");
16 }
17
18 void
19 to_json(json &obj, const Tombstone &content)
20 {
21 obj["body"] = content.body;
22 obj["replacement_room"] = content.replacement_room;
23 }
24
25 } // namespace state
26 } // namespace events
27 } // namespace mtx