Skip to content

postmodern/sinatra-json

Repository files navigation

sinatra-json

CI Code Climate

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

Install

$ gem install sinatra-json

Copyright

Copyright (c) 2009-2015 Konstantin Haase, Hal Brodigan

See {file:LICENSE.txt} for details.

About

sinatra/json extracted from sinatra-contrib.

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages