Generate valid json instead of a PHP array structure.