-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Closed
Labels
solution: proposed fixa fix for the issue has been proposed and waits for confirmationa fix for the issue has been proposed and waits for confirmation
Description
I'm parsing JSON sent to a socketing server like so;
try
{
nlohmann::json json;
json.parse(request);
if (json[0].get<std::string>().find("z") != std::string::npos && json[0].get<std::string>().find("L") != std::string::npos &&
json[0].get<std::string>().find("|") != std::string::npos && json[0].get<std::string>().find("jM") != std::string::npos)
return true;
}
catch (nlohmann::detail::parse_error e)
{
c_logger::error(e.what());
return false;
}
This is the output from the server after receiving the request;
[~] = {"auth":"p4AzO|L1jMf=","request":"update_ips","ips":{"ip1":"144.12.123.11","ip2":"122.311.33.87","ip3":"91.122.31.633",},"ip_amount":3}
[~] [error] = [json.exception.parse_error.101] parse error at 120: syntax error - unexpected '}'; expected string literal
I really don't see what the issue is, it's probably something really stupid. Help would be appreciated.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
solution: proposed fixa fix for the issue has been proposed and waits for confirmationa fix for the issue has been proposed and waits for confirmation