Skip to content

Instantly share code, notes, and snippets.

@raws
Created November 16, 2010 15:56
Show Gist options
  • Save raws/701967 to your computer and use it in GitHub Desktop.
Save raws/701967 to your computer and use it in GitHub Desktop.
require "rubygems"
require "sinatra"
require "json"
after do
response.body = response.body.to_json
content_type :json
end
get "/foo" do
{ "foo" => "bar", "baz" => [ "blat", "honk", "hork" ] }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment