Alright, so, I have a game that uploads data in the form of JSON to my site. The JSON resembles this:
{
"PlayerList":[
{
"PlayerKills":0,
"Username":"Player1",
"TimePlayed":0,
"Deaths":0
},
{
"PlayerKills":0,
"Username":"Player1",
"TimePlayed":0,
"Deaths":0
}
]
}
After confirming that the JSON is indeed correct, and without errors, I began speculating that the problem lie in the PHP. The code I use to get the JSON is:
$decodedJSON = json_decode($entityBody, true, 4);
var_dump($decodedJSON);
With $entitybody being the JSON as a string.
The var_dump here returns NULL, and since I'm stuck using PHP 5.2, I cannot determine what the problem is using json_last_error.
So if anyone can provide me some info as to where the problem lies, it would be much appreciated.