diff --git a/api_valve.gemspec b/api_valve.gemspec index db54c92..833b654 100644 --- a/api_valve.gemspec +++ b/api_valve.gemspec @@ -15,7 +15,7 @@ Gem::Specification.new do |s| s.add_dependency 'activesupport', '>= 6.1', '< 7.1' s.add_dependency 'faraday', '>= 0.14', '<= 2.5.2' - s.add_dependency 'multi_json', '~> 1.13' + s.add_dependency 'json', '>= 2.0' s.add_dependency 'rack', '>= 2', '< 4' s.add_development_dependency 'json_spec', '~> 1.1' diff --git a/lib/api_valve.rb b/lib/api_valve.rb index c399868..fb35ac4 100644 --- a/lib/api_valve.rb +++ b/lib/api_valve.rb @@ -10,7 +10,7 @@ require 'active_support/rescuable' require 'benchmark' require 'faraday' -require 'multi_json' +require 'json' require 'logger' require 'rack' diff --git a/lib/api_valve/error_responder.rb b/lib/api_valve/error_responder.rb index 4fff795..eaa27dd 100644 --- a/lib/api_valve/error_responder.rb +++ b/lib/api_valve/error_responder.rb @@ -8,7 +8,7 @@ def call Rack::Response[ status, {'Content-Type' => 'application/vnd.api+json'}, - MultiJson.dump({errors: [json_error]}, mode: :compat) + JSON.generate({errors: [json_error]}, mode: :compat) ] end