json_encode fix for PHP 5.2
Flat json option