blob: f70acd553706581ff7667b184a04c9edffbaf5dc (
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 "location.h"
using namespace QMatrixClient;
QJsonObject QMatrixClient::toJson(const Location& pod)
{
QJsonObject _json;
addParam<IfNotEmpty>(_json, QStringLiteral("alias"), pod.alias);
addParam<IfNotEmpty>(_json, QStringLiteral("protocol"), pod.protocol);
addParam<IfNotEmpty>(_json, QStringLiteral("fields"), pod.fields);
return _json;
}
Location FromJson<Location>::operator()(const QJsonValue& jv)
{
const auto& _json = jv.toObject();
Location result;
result.alias =
fromJson<QString>(_json.value("alias"_ls));
result.protocol =
fromJson<QString>(_json.value("protocol"_ls));
result.fields =
fromJson<QJsonObject>(_json.value("fields"_ls));
return result;
}
|