I\'m developing an Android app, and for the API I\'m sending my requests to a URL that should return JSON data.
This is what I\'m getting in my output:
PHP's json_encode function takes a second argument, for $options. Here you can use JSON_PRETTY_PRINT to print it like you see in the Twitter API
$options
JSON_PRETTY_PRINT
E.g.
echo json_encode($my_array, JSON_PRETTY_PRINT);