This extension is part of the Sinatra::Contrib project. Run gem install sinatra-contrib to have it available. Sinatra::JSON¶ ↑ Sinatra::JSON adds a helper method, called json, for (obviously) json generation. Usage¶ ↑ Classic Application¶ ↑ In a classic application simply require the helper, and start using it: require "sinatra" require "sinatra/json" # define a route that uses the helper get '/'