Debian Codegraph @

mtxclient/lib/structs/events/reaction.cpp

raw symbols SCIP
1 #include <nlohmann/json.hpp>
2
3 #include "mtx/events/reaction.hpp"
4
5 using json = nlohmann::json;
6
7 namespace mtx {
8 namespace events {
9 namespace msg {
10
11 void
12 from_json(const json &obj, Reaction &content)
13 {
14 content.relations = common::parse_relations(obj);
15 }
16
17 void
18 to_json(json &obj, const Reaction &content)
19 {
20 obj = nlohmann::json::object();
21
22 common::apply_relations(obj, content.relations);
23 }
24
25 } // namespace msg
26 } // namespace events
27 } // namespace mtx