Observe this little script:
$array = array(\'stuff\' => \'things\'); print_r($array); //prints - Array ( [stuff] => things ) $arrayEncoded = json_encod
tl;dr: JavaScript doesn't support associative arrays, therefore neither does JSON.
After all, it's JSON, not JSAAN. :)
So PHP has to convert your array into an object in order to encode into JSON.