Sha256: 034e3b29e55de0c26a5347040ec1b13a27e1908168c7fac80963907408462d54
Contents?: true
Size: 407 Bytes
Versions: 9
Compression:
Stored size: 407 Bytes
Contents
# frozen_string_literal: true module Grape module Parser module Json class << self def call(object, _env) ::Grape::Json.load(object) rescue ::Grape::Json::ParseError # handle JSON parsing errors via the rescue handlers or provide error message raise Grape::Exceptions::InvalidMessageBody, 'application/json' end end end end end
Version data entries
9 entries across 9 versions & 2 rubygems