method
parse_formatted_parameters
parse_formatted_parameters(env)
private
Hide source
# File actionpack/lib/action_dispatch/middleware/params_parser.rb, line 31 def parse_formatted_parameters(env) request = Request.new(env) return false if request.content_length.zero? strategy = @parsers[request.content_mime_type] return false unless strategy case strategy when Proc strategy.call(request.raw_post) when :json data = ActiveSupport::JSON.decode(request.raw_post) data = {:_json => data} unless data.is_a?(Hash) request.deep_munge(data).with_indifferent_access else false end rescue Exception => e # JSON or Ruby code block errors logger(env).debug "Error occurred while parsing request parameters.\nContents:\n\n#{request.raw_post}" raise ParseError.new(e.message, e) end