title: PHP json_decode Not Working
body: <p>Alright, so, I have a game that uploads data in the form of JSON to my site. The JSON resembles this:</p>
  
  <pre><code>{
    "PlayerList":[
      {
          "PlayerKills":0,
          "Username":"Player1",
          "TimePlayed":0,
          "Deaths":0
      },
      {
          "PlayerKills":0,
          "Username":"Player1",
          "TimePlayed":0,
          "Deaths":0
      }
    ]
  }
  </code></pre>
  
  <p>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:</p>
  
  <pre><code>$decodedJSON =  json_decode($entityBody, true, 4);              
  var_dump($decodedJSON);
  </code></pre>
  
  <p>With $entitybody being the JSON as a string.</p>
  
  <p>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. </p>
  
  <p>So if anyone can provide me some info as to where the problem lies, it would be much appreciated.</p>