for the case of no results. (in json you dont want to display the message "no results" but u do if it is not json). formatOuput gives that logic by ensuring that the callback is the human readable format (not json) and handling json on it's own.