refs #911, utility functions for cut and paste JSON

This commit is contained in:
Klaus Basan
2017-03-23 01:32:49 +01:00
committed by Mathew Sutcliffe
parent 6c752b81f5
commit b785e32256
3 changed files with 25 additions and 4 deletions

View File

@@ -126,7 +126,7 @@ namespace BlackCore
CLogMessage(this).error("Authentication failed, no response from %1") << urlString;
return;
}
if (!json.startsWith('{') || !json.endsWith('}'))
if (!Json::looksLikeJson(json))
{
CLogMessage(this).error("Illegal JSON object: %1") << CNetworkUtils::removeHtmlPartsFromPhpErrorMessage(json);
return;