lib/pupa/processor/middleware/parse_json.rb in pupa-0.0.11 vs lib/pupa/processor/middleware/parse_json.rb in pupa-0.0.12
- old
+ new
@@ -3,13 +3,13 @@
module Middleware
# A Faraday response middleware for parsing JSON.
#
# @see https://github.com/lostisland/faraday_middleware/issues/30#issuecomment-4706892
class ParseJson < FaradayMiddleware::ResponseMiddleware
- dependency 'multi_json'
+ dependency 'oj'
define_parser do |body|
- MultiJson.load(body) unless body.strip.empty?
+ Oj.load(body) unless body.strip.empty?
end
end
end
end
end