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

Add Poison.encode_to_iodata(!)/2 back #197

Merged
merged 2 commits into from
May 31, 2024
Merged

Conversation

RudolfMan
Copy link
Contributor

I was updating libraries in one of the elixir applications where phoenix is configured to use Poison as a :json_library. Unfortunately, current version of Poison is not compatible with Phoenix because phoenix expects json_library to implement encode_to_iodata!/2 (for example here)

This PR is just a cherri-pick of the commit from #19
Those changes were lost in this PR

Or is this drop of those functions intentional?

José Valim and others added 2 commits August 5, 2021 17:29
Having an explicit function plays nicer with dialyzer
and makes Poison simpler to use as callbacks.

Ideally we would deprecate the :iodata option in
encode and titghen its typespecs but I haven't done
so in this commit in order to keep backwards
compatibility.
@devinus devinus merged commit af4ae70 into devinus:master May 31, 2024
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