refs #815 Added convertFromJsonNoThrow methods which catch CJsonException and return CStatusMessage.

This commit is contained in:
Mathew Sutcliffe
2016-12-20 23:10:21 +00:00
parent bbdbd26f82
commit 4f6d3ed3a3
6 changed files with 149 additions and 1 deletions

View File

@@ -277,12 +277,18 @@ namespace BlackMisc
//! \copydoc BlackMisc::Mixin::JsonByMetaClass::convertFromJson
void convertFromJson(const QJsonObject &json);
//! Call convertFromJson, catch any CJsonException that is thrown and return it as CStatusMessage.
CStatusMessage convertFromJsonNoThrow(const QJsonObject &json, const CLogCategoryList &categories, const QString &prefix);
//! To compact JSON format.
QJsonObject toMemoizedJson() const;
//! From compact JSON format.
void convertFromMemoizedJson(const QJsonObject &json);
//! Call convertFromMemoizedJson, catch any CJsonException that is thrown and return it as CStatusMessage.
CStatusMessage convertFromMemoizedJsonNoThrow(const QJsonObject &json, const CLogCategoryList &categories, const QString &prefix);
//! \copydoc BlackMisc::Mixin::DBusByMetaClass::marshallToDbus
void marshallToDbus(QDBusArgument &argument) const;