def parse_params(request)
      json = request.body.read
      JSON.parse(json).symbolize_keys if json.is_a?(String) && !json.empty?
    end
def parse_params(request)
      json = request.body.read
      JSON.parse(json).symbolize_keys if json.is_a?(String) && !json.empty?
    end
Parses JSON string in request body if present and converts it to a hash.
 @param request [Rack::Request] contains information about the current HTTP
        request
 @return {Hash} including parsed params or nil