Skip to content

remove multi_json dependency #1292

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

Closed
wants to merge 1 commit into from
Closed

remove multi_json dependency #1292

wants to merge 1 commit into from

Conversation

u2
Copy link
Contributor

@u2 u2 commented Feb 24, 2016

* `:xml`: use object's `to_xml` when available, usually via `MultiXml`, otherwise call `to_s`
* `:txt`: use object's `to_txt` when available, otherwise `to_s`
* `:serializable_hash`: use object's `serializable_hash` when available, otherwise fallback to `:json`
* `:binary`: data will be returned "as is"

Grape now not longer use MultiJson as JSON processor.If you want to continue to use MultiJson, you can use it by below
Copy link
Member

Choose a reason for hiding this comment

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

This should be moved to UPGRADING. Some minor "better" English: "Grape no longer uses MultiJson as default JSON processor. To use MultiJson add multi_json to your Gemfile and set config.json_processor.

Copy link
Member

Choose a reason for hiding this comment

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

README should contain an explanation of how to switch JSON processors though.

@dblock
Copy link
Member

dblock commented Feb 25, 2016

First, thanks for keeping at it. It's an important and sensitive change given that it will affect everybody.

I don't like the global configuration, that prevents you from shipping two versions of the API where old uses multi_json and new uses json, basically we don't provide a path for deprecating an old JSON processor, we force you to remove it.

I think what we want is a per-api configuration, like format :json, processor: MultiJson.

I am not against another global option, but I don't think it should be Grape global, maybe just formatter global, like Grape::Formatter::JSON.configure do ....

What do you think?

@dblock
Copy link
Member

dblock commented Oct 21, 2016

Bump @u2 I think this would still be awesome.

@dblock
Copy link
Member

dblock commented May 2, 2017

Replacing in favor of #1623.

@dblock dblock closed this May 2, 2017
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.

2 participants