sinatra/sinatra-contrib — pull request #137 by ismith (2014-05-29 22:02:49+00:00)
Title: Add Sinatra::JSONRequest module with body_as_json helper

We've found this useful in dealing with json request bodies; it abstracts away the "is there a non-nil/non-empty body? Is it valid JSON?" and returns the parsed body.