Module: Hanami::Action::BodyParser::JSON Private
- Defined in:
- lib/hanami/action/body_parser/json.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Body parser for JSON request bodies.
Class Method Summary collapse
- .call(body, _env) ⇒ Object private
Class Method Details
.call(body, _env) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
12 13 14 15 16 |
# File 'lib/hanami/action/body_parser/json.rb', line 12 def self.call(body, _env) ::JSON.parse(body) rescue ::JSON::ParserError => exception raise BodyParsingError, exception. end |