19 immer::array<PushRule>
override;
22 immer::array<PushRule>
room;
40 if (! jo.is_object()) { jo = json::object(); }
57 if (jo.contains(
"content"s)) {
58 result.
content = jo.at(
"content"s);
60 if (jo.contains(
"override"s)) {
61 result.
override = jo.at(
"override"s);
63 if (jo.contains(
"room"s)) {
64 result.
room = jo.at(
"room"s);
66 if (jo.contains(
"sender"s)) {
67 result.
sender = jo.at(
"sender"s);
69 if (jo.contains(
"underride"s)) {
Definition: location.hpp:10
Definition: location.hpp:10
void addToJsonIfNeeded(json &j, std::string name, T &&arg)
Definition: types.hpp:80
nlohmann::json json
Definition: jsonwrap.hpp:20
Definition: location.hpp:27
Definition: push_ruleset.hpp:13
immer::array< PushRule > underride
Definition: push_ruleset.hpp:28
immer::array< PushRule > sender
Definition: push_ruleset.hpp:25
immer::array< PushRule > override
Definition: push_ruleset.hpp:19
immer::array< PushRule > content
Definition: push_ruleset.hpp:16
immer::array< PushRule > room
Definition: push_ruleset.hpp:22
static void from_json(const json &jo, PushRuleset &result)
Definition: push_ruleset.hpp:54
static void to_json(json &jo, const PushRuleset &pod)
Definition: push_ruleset.hpp:38