I prefer to specify the format using an accept header (if the api supports it)