Drop MultiJson dependency
It is no longer encouraged to use the multi_json gem due to this reason: https://github.com/intridea/multi_json/pull/113#issuecomment-17668823
cc @dblock
Can you add a CHANGELOG entry, please? 😸
This should be good to merge once the CI is green.
roar depends on multi_json via representable (for prior context). I remembered now.
https://github.com/ruby-grape/grape-active_model_serializers/blob/master/lib/grape-active_model_serializers/error_formatter.rb#L19 might be helpful, although I am not in love with the solution, maybe define Grape::JSON if it's not already defined?
So why do we need to have a check against #to_json? It doesn't look like it is the same method that comes from require 'json', but I feel like there shouldn't be any case where the object doesn't respond to #to_json.
@mach-kernel it doesn't look like representable depends on the multi_json gem today, it used to until 2.2.3.
Representable actually requires multi_json for JSON support today, see https://github.com/trailblazer/representable/blob/b4439a5e025106af282f8dbc590418a108640159/lib/representable/json.rb#L4. So a PR should go upstream.