- Homepage
- Issues
- Documentation
- [Email](mailto:postmodern.mod3 at gmail.com)
{Sinatra::JSON}, extracted from sinatra-contrib.
- Encodes JSON responses.
- Sets Content-Type to
application/json
. - Supports multiple JSON backends via multi_json.
require 'sinatra/json'
class App < Sinatra::Base
get '/' do
json(foo: 'bar')
end
end
- multi_json ~> 1.0
- sinatra ~> 1.0
$ gem install sinatra-json
Copyright (c) 2009-2015 Konstantin Haase, Hal Brodigan
See {file:LICENSE.txt} for details.