18 json.insert(it.key(), it.value().toJson());
33 for (
auto it = json.begin(); it != json.end(); ++it)
39 value.convertFromJson(it.value().toObject());
50 if (
value.isUndefined())
66 json.insert(it.key(), it.value().toMemoizedJson());
81 for (
auto it = json.begin(); it != json.end(); ++it)
87 value.convertFromMemoizedJson(it.value().toObject(),
true);
98 if (
value.isUndefined())
115 for (
auto it = json.begin(); it != json.end(); ++it)
121 auto message =
value.convertFromJsonNoThrow(it.value().toObject(), categories, prefix);
122 if (message.isSuccess())
142 if (
value.isUndefined())
150 if (message.isSuccess())
168 for (
auto it = json.begin(); it != json.end(); ++it)
174 auto message =
value.convertFromMemoizedJsonNoThrow(it.value().toObject(), categories, prefix);
175 if (message.isSuccess())
196 if (
value.isUndefined())
204 if (message.isSuccess())
const CVariant value(const QString &key) const
friend impl_type & implementationOf(CDictionary &dict)
const_iterator cbegin() const
iterator insert(const QString &key, const CVariant &value)
const QString key(const CVariant &value) const
const_iterator cend() const
Pseudo-RAII pattern that tracks the current JSON value being converted.
A sequence of log categories.
void push_back(const T &value)
Appends an element at the end of the sequence.
Status messages, e.g. from Core -> GUI.
Wrapper around QVariant which provides transparent access to CValueObject methods of the contained ob...
CStatusMessage convertFromMemoizedJsonNoThrow(const QJsonObject &json, const CLogCategoryList &categories, const QString &prefix)
Call convertFromMemoizedJson, catch any CJsonException that is thrown and return it as CStatusMessage...
void convertFromMemoizedJson(const QJsonObject &json, bool allowFallbackToJson)
From compact JSON format.
void convertFromJson(const QJsonObject &json)
Assign from JSON object.
CStatusMessage convertFromJsonNoThrow(const QJsonObject &json, const CLogCategoryList &categories, const QString &prefix)
Call convertFromJson, catch any CJsonException that is thrown and return it as CStatusMessage.
void convertFromJson(const QJsonObject &json)
Assign from JSON object.
QJsonObject & mergeToMemoizedJson(QJsonObject &json) const
Insert values from this map into an existing compact JSON object.
CStatusMessageList convertFromMemoizedJsonNoThrow(const QJsonObject &json, const CLogCategoryList &categories, const QString &prefix)
Call convertFromMemoizedJson, catch any CJsonException that are thrown and return them as CStatusMess...
void convertFromMemoizedJson(const QJsonObject &json)
From compact JSON format.
QJsonObject toMemoizedJson() const
To compact JSON format.
QJsonObject toJson() const
Cast to JSON object.
QJsonObject & mergeToJson(QJsonObject &json) const
Insert values from this map into an existing JSON object.
CStatusMessageList convertFromJsonNoThrow(const QJsonObject &json, const CLogCategoryList &categories, const QString &prefix)
Call convertFromJson, catch any CJsonException that are thrown and return them as CStatusMessage.
Free functions in swift::misc.
QMap< Key, T >::iterator insert(QMap< Key, T >::const_iterator pos, const Key &key, const T &value)