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