Sha256: 22f377525fb6583ae343971aa04a25cc76193301e93dfef9f67e59ffb0df58f7

Contents?: true

Size: 252 Bytes

Versions: 7

Compression:

Stored size: 252 Bytes

Contents

module APIMatchers
  module Core
    module Parser
      def json
        JSON.parse(response_body)
      rescue JSON::ParserError => exception
        raise ::APIMatchers::InvalidJSON.new("Invalid JSON: '#{response_body}'")
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
api_matchers-0.6.2 lib/api_matchers/core/parser.rb
api_matchers-0.6.1 lib/api_matchers/core/parser.rb
api_matchers-0.6.0 lib/api_matchers/core/parser.rb
api_matchers-0.5.1 lib/api_matchers/core/parser.rb
api_matchers-0.5.0 lib/api_matchers/core/parser.rb
api_matchers-0.4.0 lib/api_matchers/core/parser.rb
api_matchers-0.3.0 lib/api_matchers/core/parser.rb