format.json

A link to the api docs may get you started:
http://api.rubyonrails.org/classes/ActiveResource/Base.html#M000827
Also look at the code generated with scaffold. I simply added a json
format.

  def index
    @sites = Site.find(:all)

    respond_to do |format|
      format.html # index.html.erb
      format.xml { render :xml => @sites.to_xml }

      format.json { render :json => @sites.to_json }
    end
  end

These are called with the URL:
http://somesite.org/index.html
http://somesite.org/index.xml
http://somesite.org/index.json

HTH
-Dave