blob: f8639432f71fc3c23b4ca02934f77f68efb98964 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
/******************************************************************************
* THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
*/
#include "auth_data.h"
using namespace QMatrixClient;
QJsonObject QMatrixClient::toJson(const AuthenticationData& pod)
{
QJsonObject jo = toJson(pod.authInfo);
addParam<>(jo, QStringLiteral("type"), pod.type);
addParam<IfNotEmpty>(jo, QStringLiteral("session"), pod.session);
return jo;
}
AuthenticationData FromJsonObject<AuthenticationData>::operator()(QJsonObject jo) const
{
AuthenticationData result;
result.type =
fromJson<QString>(jo.take("type"_ls));
result.session =
fromJson<QString>(jo.take("session"_ls));
result.authInfo = fromJson<QHash<QString, QJsonObject>>(jo);
return result;
}
|