class Staticd::JSONRequest

Simple JSON body parser for HTTP request.

Example:

hash = JSONRequest.parse(request_body)

Public Class Methods

parse(body) click to toggle source
# File lib/staticd/json_request.rb, line 11
def self.parse(body)
  body.empty? ? {} : JSON.parse(body)
end