blob: 17687cfdc138212b177c507b16e88d3f48ae043d (
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
29
30
31
|
/******************************************************************************
* THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
*/
#include "user.h"
using namespace QMatrixClient;
QJsonObject QMatrixClient::toJson(const ThirdPartyUser& pod)
{
QJsonObject _json;
addParam<IfNotEmpty>(_json, QStringLiteral("userid"), pod.userid);
addParam<IfNotEmpty>(_json, QStringLiteral("protocol"), pod.protocol);
addParam<IfNotEmpty>(_json, QStringLiteral("fields"), pod.fields);
return _json;
}
ThirdPartyUser FromJson<ThirdPartyUser>::operator()(const QJsonValue& jv)
{
const auto& _json = jv.toObject();
ThirdPartyUser result;
result.userid =
fromJson<QString>(_json.value("userid"_ls));
result.protocol =
fromJson<QString>(_json.value("protocol"_ls));
result.fields =
fromJson<QJsonObject>(_json.value("fields"_ls));
return result;
}
|