18 #include <QJsonDocument> 51 type =
new QString(
"");
53 name =
new QString(
"");
73 QByteArray array (json.toStdString().c_str());
74 QJsonDocument doc = QJsonDocument::fromJson(array);
75 QJsonObject jsonObject = doc.object();
97 QJsonDocument doc(*obj);
98 QByteArray bytes = doc.toJson();
100 return QString(bytes);
105 QJsonObject* obj =
new QJsonObject();
112 if(
type !=
nullptr && *
type != QString(
"")){
115 if(
name !=
nullptr && *
name != QString(
"")){
165 bool isObjectUpdated =
false;
169 if(
type !=
nullptr && *
type != QString(
"")){ isObjectUpdated =
true;
break;}
170 if(
name !=
nullptr && *
name != QString(
"")){ isObjectUpdated =
true;
break;}
172 return isObjectUpdated;
void setName(QString *name)
void toJsonValue(QString name, void *value, QJsonObject *output, QString type)
virtual void fromJsonObject(QJsonObject &json) override
virtual bool isSet() override
void setType(QString *type)
virtual QJsonObject * asJsonObject() override
bool m_center_frequency_isSet
virtual ~SWGPresetIdentifier()
virtual SWGPresetIdentifier * fromJson(QString &jsonString) override
void setGroupName(QString *group_name)
void setValue(void *value, QJsonValue obj, QString type, QString complexType)
qint64 getCenterFrequency()
void setCenterFrequency(qint64 center_frequency)
virtual QString asJson() override