aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/definitions/user_identifier.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csapi/definitions/user_identifier.cpp')
-rw-r--r--lib/csapi/definitions/user_identifier.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/csapi/definitions/user_identifier.cpp b/lib/csapi/definitions/user_identifier.cpp
index 80a6d450..05a27c1c 100644
--- a/lib/csapi/definitions/user_identifier.cpp
+++ b/lib/csapi/definitions/user_identifier.cpp
@@ -6,20 +6,18 @@
using namespace QMatrixClient;
-QJsonObject QMatrixClient::toJson(const UserIdentifier& pod)
+void JsonObjectConverter<UserIdentifier>::dumpTo(
+ QJsonObject& jo, const UserIdentifier& pod)
{
- QJsonObject jo = toJson(pod.additionalProperties);
+ fillJson(jo, pod.additionalProperties);
addParam<>(jo, QStringLiteral("type"), pod.type);
- return jo;
}
-UserIdentifier FromJsonObject<UserIdentifier>::operator()(QJsonObject jo) const
+void JsonObjectConverter<UserIdentifier>::fillFrom(
+ QJsonObject jo, UserIdentifier& result)
{
- UserIdentifier result;
- result.type =
- fromJson<QString>(jo.take("type"_ls));
+ fromJson(jo.take("type"_ls), result.type);
- result.additionalProperties = fromJson<QVariantHash>(jo);
- return result;
+ fromJson(jo, result.additionalProperties);
}