Please note that REST does not just mean JSON results. REST essentially means exposing a resource-oriented API over native but full-fledged HTTP. I am not an expert on REST, but here are a few of the things Rails is doing.
- URLs should be good, simple names for resources
- Use the right HTTP methods
- HEAD, GET, POST, PUT, and DELETE
- Optionally with an override (form parameter '_method' will override HTTP request-method)
- Support content-type negotiation via Accept request-header
- Optionally with an override (filename extension in the URL will override MIME-type in the Accept request-header)
- Available content types should include XML, XHTML, HTML, JSON, YAML, and many others as appropriate
For example, to get the native HTTP support going, the server should respond to
GET /account/profile HTTP/1.1
Host: example.com
Accept: application/json
as it would respond to
GET /account/profile.json HTTP/1.1
Host: example.com
And it should respond to
PUT /account/profile HTTP/1.1
Host: example.com
var=value
as it would respond to
POST /account/profile HTTP/1.1
Host: example.com
_method=PUT&var=value