Skip to content
This repository has been archived by the owner on Feb 28, 2019. It is now read-only.

Commit

Permalink
Merge pull request #4 from gerbal/master
Browse files Browse the repository at this point in the history
Scope JSON to global ruby ::JSON, prevents conflicts with Sinatra::JSON
  • Loading branch information
archiloque committed Jul 12, 2016
2 parents 14f90ca + e915d7f commit 9281468
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -32,8 +32,8 @@ def useful?
def validate_response(response_body)
parsed_response_body = nil
begin
parsed_response_body = JSON.parse(response_body)
rescue JSON::ParserError => e
parsed_response_body = ::JSON.parse(response_body)
rescue ::JSON::ParserError => e
raise SwaggerInvalidException.new("Response is not a valid json [#{response_body}]")
end
if @processor
Expand All @@ -44,4 +44,4 @@ def validate_response(response_body)
end
end
end
end
end

0 comments on commit 9281468

Please sign in to comment.