blob: dfc12f29922577825e3653b5ec53fae230e77294 (
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 User& 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;
}
User FromJson<User>::operator()(const QJsonValue& jv)
{
const auto& _json = jv.toObject();
User 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;
}
|