added object to array conversion on the output of json_decode, which was breaking array_merge in PHP 5.5