TEMP FIX HACK TODO - for whatever reason spaced strings seem to return as arrays when using the json parser's .get function

This commit is contained in:
DarthArgus
2016-04-24 18:14:31 +00:00
parent 1507b19b3a
commit 5fc9a0e689
@@ -231,7 +231,11 @@ void ClientConnection::validateClient(const std::string & id, const std::string
if (j.count("message"))
{
errMsg = j["message"].get<std::string>();
// fuuuu hack here - .get<cstd::string>() is returning an array and not a string, wtf?
errMsg = j["message"].dump();
errMsg.erase(std::remove(errMsg.begin(), errMsg.end(), '"'), errMsg.end());
errMsg.erase(std::remove(errMsg.begin(), errMsg.end(), ']'), errMsg.end());
errMsg.erase(std::remove(errMsg.begin(), errMsg.end(), '['), errMsg.end());
}
else
{