5 #include <Quotient/converters.h>
11 int firstMessageIndex;
23 QJsonObject sessionData;
27 struct JsonObjectConverter<KeyBackupData> {
28 static void dumpTo(QJsonObject& jo,
const KeyBackupData& pod)
30 addParam<>(jo,
"first_message_index"_L1, pod.firstMessageIndex);
31 addParam<>(jo,
"forwarded_count"_L1, pod.forwardedCount);
32 addParam<>(jo,
"is_verified"_L1, pod.isVerified);
33 addParam<>(jo,
"session_data"_L1, pod.sessionData);
35 static void fillFrom(
const QJsonObject& jo, KeyBackupData& pod)
37 fillFromJson(jo.value(
"first_message_index"_L1), pod.firstMessageIndex);
38 fillFromJson(jo.value(
"forwarded_count"_L1), pod.forwardedCount);
39 fillFromJson(jo.value(
"is_verified"_L1), pod.isVerified);
40 fillFromJson(jo.value(
"session_data"_L1), pod.sessionData);