string I get
{
"players": [
{
"SteamId": "765611974898245625",
"CommunityBanned": false,
"VACBanned": true,
"NumberOfVACBans": 1,
"DaysSinceLastBan": 1011,
"NumberOfGameBans": 1,
"EconomyBan": "none"
}
]
}
I need to get from it
bool VACBanned = true;
int NumberOfVACBans = 1;
and so on
I use nlohmann json
using json = nlohmann::json;
auto j3 = json::parse(respone.c_str());
if (j3.is_boolean()) // crashing without this check
g_Player[index].bVACBanned = j3.at("VACBanned").get<bool>();
for some reason it doesn't work