Наблюдайте этот небольшой сценарий:
$array = array('stuff' => 'things');
print_r($array);
//prints - Array ( [stuff] => things )
$arrayEncoded = json_encode($array);
echo $arrayEncoded . "<br />";
//prints - {"stuff":"things"}
$arrayDecoded = json_decode($arrayEncoded);
print_r($arrayDecoded);
//prints - stdClass Object ( [stuff] => things )
Почему PHP поворачивает Объект JSON в класс?
Не был должен массив, который является json_encoded
затем json_decoded
привести к тому же самому результату?
Внимательно изучите второй параметр json_decode ($ json, $ assoc, $ depth)
по адресу https://secure.php.net/json_decode
$arrayDecoded = json_decode($arrayEncoded, true);
дает вам массив.