Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop MultiJson dependency #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Drop MultiJson dependency #24

wants to merge 1 commit into from

Conversation

yuki24
Copy link
Contributor

@yuki24 yuki24 commented Oct 27, 2017

It is no longer encouraged to use the multi_json gem due to this reason: intridea/multi_json#113 (comment)

cc @dblock

Copy link
Member

@mach-kernel mach-kernel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mach-kernel
Copy link
Member

Can you add a CHANGELOG entry, please? 😸

@yuki24
Copy link
Contributor Author

yuki24 commented Oct 27, 2017

This should be good to merge once the CI is green.

@mach-kernel
Copy link
Member

mach-kernel commented Oct 27, 2017

roar depends on multi_json via representable (for prior context). I remembered now.

Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specs will be failing so you might need to do more gymnastics as Grape::JSON was not introduced until 1.0 version of Grape.

CHANGELOG.md Outdated
@@ -1,7 +1,7 @@
Next
----

* Your contribution here.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put this back.
Change the format of below to match every other line, please.

@dblock
Copy link
Member

dblock commented Oct 27, 2017

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?

@yuki24
Copy link
Contributor Author

yuki24 commented Oct 27, 2017

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.

@yuki24
Copy link
Contributor Author

yuki24 commented Oct 27, 2017

@mach-kernel it doesn't look like representable depends on the multi_json gem today, it used to until 2.2.3.

@dblock
Copy link
Member

dblock commented Oct 31, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants