jillesvangurp/sinatra-docdsl — pull request #3 by joustava (2014-02-28 01:17:54+00:00)
Title: use double-colon to make sure top level JSON module is used

In some projects I use the gem 'sinatra-contrib'. This makes the module Sinatra::JSON available in the project and causes an "undefined method `pretty_generate' for Sinatra::JSON:Module" error when generating 'payload' and 'response' examples.

Changing JSON.pretty_generate to ::JSON.pretty_generate makes sure the top level JSON module is called (at least in this case).