aboutsummaryrefslogtreecommitdiff
path: root/src/data
diff options
context:
space:
mode:
Diffstat (limited to 'src/data')
-rw-r--r--src/data/event.cpp13
-rw-r--r--src/data/filters.cpp13
2 files changed, 14 insertions, 12 deletions
diff --git a/src/data/event.cpp b/src/data/event.cpp
index e275f31..d101531 100644
--- a/src/data/event.cpp
+++ b/src/data/event.cpp
@@ -19,12 +19,13 @@ string Event::serialize()
}
json j = {
- {"pubkey", this->pubkey},
- {"created_at", this->createdAt},
- {"kind", this->kind},
- {"tags", this->tags},
- {"content", this->content},
- {"sig", this->sig}};
+ { "pubkey", this->pubkey },
+ { "created_at", this->createdAt },
+ { "kind", this->kind },
+ { "tags", this->tags },
+ { "content", this->content },
+ { "sig", this->sig }
+ };
j["id"] = this->generateId(j.dump());
diff --git a/src/data/filters.cpp b/src/data/filters.cpp
index 11c099b..a8e3343 100644
--- a/src/data/filters.cpp
+++ b/src/data/filters.cpp
@@ -18,12 +18,13 @@ string Filters::serialize(string& subscriptionId)
}
json j = {
- {"ids", this->ids},
- {"authors", this->authors},
- {"kinds", this->kinds},
- {"since", this->since},
- {"until", this->until},
- {"limit", this->limit}};
+ { "ids", this->ids },
+ { "authors", this->authors },
+ { "kinds", this->kinds },
+ { "since", this->since },
+ { "until", this->until },
+ { "limit", this->limit }
+ };
for (auto& tag : this->tags)
{