0.0
No commit activity in last 3 years
No release in over 3 years
sinatra/json extracted from sinatra-contrib.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.6
~> 10.0
~> 2.4
~> 0.8

Runtime

~> 1.0
 Project Readme

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.