Skip to content

Instantly share code, notes, and snippets.

@adjohu
Created January 13, 2012 11:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save adjohu/1605743 to your computer and use it in GitHub Desktop.
Save adjohu/1605743 to your computer and use it in GitHub Desktop.
module Rack
class JSON
def initialize app
@app = app
end
def call env
@status, @headers, @body = @app.call env
@body = @body.to_json
end
end
end
use Rack::JSON
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment