Added helper methods for json and xml to the response object.