# REST default response format

**URL:** <https://www.ruby-forum.com/t/rest-default-response-format/92717>\
**Category:** Rails\
**Created:** [April 23, 2007, 12:17pm UTC](https://www.ruby-forum.com/t/rest-default-response-format/92717 "2007-04-23T12:17:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 23, 2007, 12:17pm UTC](https://www.ruby-forum.com/t/rest-default-response-format/92717/1 "2007-04-23T12:17:58Z")

</div>

Hi,

Does anybody know how to change the default response format of RESTful  
controllers?  
My controllers support both XML and JSON responses but I need JSON one  
to be the default one.

Changing the order of the format.xx {} clauses does not seem to solve  
the problem.

Regards,  
Erik
