interagent/http-api-design — pull request #40 by keithamus (2014-07-23 13:59:31+00:00)
Title: Recommend `indent` option for Pretty-Printing JSON

In the section [Pretty-print JSON by default](https://github.com/interagent/http-api-design#pretty-print-json-by-default) `master` recommends the JSON be output pretty-printed, unless the response reaches an arbitrary limit, at which point to avoid this.

I propose we recommend using the `indent` option, allowing clients to specify how verbose they want the output. For example having `Accept: application/vnd.heroku+json; version=3; indent=0` would produce this:

```json
{"beta":false,"email":"alice@heroku.com","id":"01234567-89ab-cdef-0123-456789abcdef","last_login":"2012-01-01T12:00:00Z","created_at":"2012-01-01T12:00:00Z","updated_at":"2012-01-01T12:00:00Z"}
```

While having `Accept: application/vnd.heroku+json; version=3; indent=4` would produce this:

```json
{
"beta": false,
"email": "alice@heroku.com",
"id": "01234567-89ab-cdef-0123-456789abcdef",
"last_login": "2012-01-01T12:00:00Z",
"created_at": "2012-01-01T12:00:00Z",
"updated_at": "2012-01-01T12:00:00Z"
}
```

This allows clients to determine how verbose they want their JSON. A good JSON library will be able to set the indent level easily like this.