5 #include <Quotient/converters.h>
19 QHash<QString, QString> keys;
24 QJsonObject signatures{};
28 struct JsonObjectConverter<CrossSigningKey> {
29 static void dumpTo(QJsonObject& jo,
const CrossSigningKey& pod)
31 addParam<>(jo,
"user_id"_L1, pod.userId);
32 addParam<>(jo,
"usage"_L1, pod.usage);
33 addParam<>(jo,
"keys"_L1, pod.keys);
34 addParam<IfNotEmpty>(jo,
"signatures"_L1, pod.signatures);
36 static void fillFrom(
const QJsonObject& jo, CrossSigningKey& pod)
38 fillFromJson(jo.value(
"user_id"_L1), pod.userId);
39 fillFromJson(jo.value(
"usage"_L1), pod.usage);
40 fillFromJson(jo.value(
"keys"_L1), pod.keys);
41 fillFromJson(jo.value(
"signatures"_L1), pod.signatures);