Observe this little script:
$array = array(\'stuff\' => \'things\'); print_r($array); //prints - Array ( [stuff] => things ) $arrayEncoded = json_encod
var_dump(json_decode('{"0":0}')); // output: object(0=>0) var_dump(json_decode('[0]')); //output: [0] var_dump(json_decode('{"0":0}', true));//output: [0] var_dump(json_decode('[0]', true)); //output: [0]
If you decode the json into array, information will be lost in this situation.