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

Poison.encode_to_iodata!/1 missing in 4.x #172

Closed
smeevil opened this issue Aug 15, 2018 · 3 comments
Closed

Poison.encode_to_iodata!/1 missing in 4.x #172

smeevil opened this issue Aug 15, 2018 · 3 comments

Comments

@smeevil
Copy link

smeevil commented Aug 15, 2018

I was wondering what happend to the Poison.encode_to_iodata!/1 function and why it seems to have been removed ? (Also a CHANGELOG.md would help ;))

This function is used by lib/phoenix/controller.ex:342

 defp encode(content, template) do
    if encoder = Template.format_encoder(template) do
      encoder.encode_to_iodata!(content)
    else
      content
    end
  end
@slashdotdash
Copy link

slashdotdash commented Nov 11, 2018

The recently release Postgrex v0.14.0 expects the JSON encoder to provide an encode_to_iodata!/1 function. Since this has been removed from Poison, it means that Poison cannot be used with Postgrex.

@Qqwy
Copy link

Qqwy commented Apr 28, 2019

This is still important!

@MeerKatDev
Copy link

MeerKatDev commented Jul 14, 2019

This happens also with the new myxql driver:

[error] GenServer #PID<0.898.0> terminating
** (UndefinedFunctionError) function Poison.encode_to_iodata!/1 is undefined or private
    (poison) Poison.encode_to_iodata!(["52", "52", "phoenix:live_reload", "phx_reply", %{response: %{}, status: :ok}])
    (phoenix) lib/phoenix/socket/serializers/v2_json_serializer.ex:21: Phoenix.Socket.V2.JSONSerializer.encode!/1
    (phoenix) lib/phoenix/socket.ex:782: Phoenix.Socket.encode_reply/2
    (phoenix) lib/phoenix/socket.ex:696: Phoenix.Socket.handle_in/4
    (phoenix) lib/phoenix/endpoint/cowboy2_handler.ex:83: Phoenix.Endpoint.Cowboy2Handler.websocket_handle/2
    (cowboy) c:/Users/<user>/<umbrella project path>/deps/cowboy/src/cowboy_websocket.erl:471: :cowboy_websocket.handler_call/6
    (cowboy) c:/Users/<user>/<umbrella project path>/deps/cowboy/src/cowboy_http.erl:233: :cowboy_http.loop/2
    (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3

Or at least I'm not sure, but sure that function is not present in 4.0 and there is some problem with Cowboy, I guess

0xAX added a commit to xerions/phoenix_swagger that referenced this issue Jun 24, 2020
0xAX added a commit to xerions/phoenix_swagger that referenced this issue Jan 14, 2021
devinus added a commit that referenced this issue Jun 9, 2024
Features:

* Support Erlang 27 and Elixir 1.17
* Reintroduce `Poison.encode_to_iodata!/1` for Phoenix compatibility
* Make `:html_safe` encode option follow OWASP recommended HTML
  escaping
* Added `Date.Range` encoding
* Allow `:as` decode option to be a function
* Added a CHANGELOG

Bug Fixes:

* Stop double decoding structs
* Fix various typespecs
* Correctly encode some UTF-8 surrogate pairs

Performance Improvements:

* Significantly improved performance

Breaking Changes:

* Removed deprecated `HashSet` encoding
* Minimum supported versions are now Erlang 24 and Elixir 1.12

Closes #105, #172, #191, #194, #199, #206, #207, #214, #217, #222.
devinus added a commit that referenced this issue Jun 9, 2024
Features:

* Support Erlang 27 and Elixir 1.17
* Reintroduce `Poison.encode_to_iodata!/1` for Phoenix compatibility
* Make `:html_safe` encode option follow OWASP recommended HTML
  escaping
* Add `Date.Range` encoding
* Allow `:as` decode option to be a function
* Add a CHANGELOG

Bug Fixes:

* Stop double decoding structs
* Fix various typespecs
* Correctly encode some UTF-8 surrogate pairs

Performance Improvements:

* Significantly improve performance

Breaking Changes:

* Remove deprecated `HashSet` encoding
* Minimum supported versions are now Erlang 24 and Elixir 1.12

Closes #105, #172, #191, #194, #199, #206, #207, #214, #217, #222.
devinus added a commit that referenced this issue Jun 9, 2024
Features:

* Support Erlang 27 and Elixir 1.17
* Reintroduce `Poison.encode_to_iodata!/1` for Phoenix compatibility
* Make `:html_safe` encode option follow OWASP recommended HTML
  escaping
* Add `Date.Range` encoding
* Allow `:as` decode option to be a function
* Add a CHANGELOG

Bug Fixes:

* Stop double decoding structs
* Fix various typespecs
* Correctly encode some UTF-8 surrogate pairs

Performance Improvements:

* Significantly improve performance

Breaking Changes:

* Remove deprecated `HashSet` encoding
* Minimum supported versions are now Erlang 24 and Elixir 1.12

Closes #105, #172, #191, #194, #199, #206, #207, #214, #217, #222.
devinus added a commit that referenced this issue Jun 9, 2024
Features:

* Support Erlang 27 and Elixir 1.17
* Reintroduce `Poison.encode_to_iodata!/1` for Phoenix compatibility
* Make `:html_safe` encode option follow OWASP recommended HTML
  escaping
* Add `Date.Range` encoding
* Allow `:as` decode option to be a function
* Add a CHANGELOG

Bug Fixes:

* Stop double decoding structs
* Fix various typespecs
* Correctly encode some UTF-8 surrogate pairs

Performance Improvements:

* Significantly improve performance

Breaking Changes:

* Remove deprecated `HashSet` encoding
* Minimum supported versions are now Erlang 24 and Elixir 1.12

Closes #105, #172, #191, #194, #199, #206, #207, #214, #217, #222.
devinus added a commit that referenced this issue Jun 9, 2024
Features:

* Support Erlang 27 and Elixir 1.17
* Reintroduce `Poison.encode_to_iodata!/1` for Phoenix compatibility
* Make `:html_safe` encode option follow OWASP recommended HTML
  escaping
* Add `Date.Range` encoding
* Allow `:as` decode option to be a function
* Add a CHANGELOG

Bug Fixes:

* Stop double decoding structs
* Fix various typespecs
* Correctly encode some UTF-8 surrogate pairs

Performance Improvements:

* Significantly improve performance

Breaking Changes:

* Remove deprecated `HashSet` encoding
* Minimum supported versions are now Erlang 24 and Elixir 1.12

Closes #105, #172, #191, #194, #199, #206, #207, #214, #217, #222.
devinus added a commit that referenced this issue Jun 9, 2024
Features:

* Support Erlang 27 and Elixir 1.17
* Reintroduce `Poison.encode_to_iodata!/1` for Phoenix compatibility
* Make `:html_safe` encode option follow OWASP recommended HTML
  escaping
* Add `Date.Range` encoding
* Allow `:as` decode option to be a function
* Add a CHANGELOG

Bug Fixes:

* Stop double decoding structs
* Fix various typespecs
* Correctly encode some UTF-8 surrogate pairs

Performance Improvements:

* Significantly improve performance

Breaking Changes:

* Remove deprecated `HashSet` encoding
* Minimum supported versions are now Erlang 24 and Elixir 1.12

Closes #105, #172, #191, #194, #199, #206, #207, #214, #217, #222.
devinus added a commit that referenced this issue Jun 9, 2024
Features:

* Support Erlang 27 and Elixir 1.17
* Reintroduce `Poison.encode_to_iodata!/1` for Phoenix compatibility
* Make `:html_safe` encode option follow OWASP recommended HTML
  escaping
* Add `Date.Range` encoding
* Allow `:as` decode option to be a function
* Add a CHANGELOG

Bug Fixes:

* Stop double decoding structs
* Fix various typespecs
* Correctly encode some UTF-8 surrogate pairs

Performance Improvements:

* Significantly improve performance

Breaking Changes:

* Remove deprecated `HashSet` encoding
* Minimum supported versions are now Erlang 24 and Elixir 1.12

Closes #105, #172, #191, #194, #199, #206, #207, #214, #217, #222.
devinus added a commit that referenced this issue Jun 9, 2024
Features:

* Support Erlang 27 and Elixir 1.17
* Reintroduce `Poison.encode_to_iodata!/1` for Phoenix compatibility
* Make `:html_safe` encode option follow OWASP recommended HTML
  escaping
* Add `Date.Range` encoding
* Allow `:as` decode option to be a function
* Add a CHANGELOG

Bug Fixes:

* Stop double decoding structs
* Fix various typespecs
* Correctly encode some UTF-8 surrogate pairs

Performance Improvements:

* Significantly improve performance

Breaking Changes:

* Remove deprecated `HashSet` encoding
* Minimum supported versions are now Erlang 24 and Elixir 1.12

Closes #105, #172, #191, #194, #199, #206, #207, #214, #217, #222.
devinus added a commit that referenced this issue Jun 9, 2024
Features:

* Support Erlang 27 and Elixir 1.17
* Reintroduce `Poison.encode_to_iodata!/1` for Phoenix compatibility
* Make `:html_safe` encode option follow OWASP recommended HTML
  escaping
* Add `Date.Range` encoding
* Allow `:as` decode option to be a function
* Add a CHANGELOG

Bug Fixes:

* Stop double decoding structs
* Fix various typespecs
* Correctly encode some UTF-8 surrogate pairs

Performance Improvements:

* Significantly improve performance

Breaking Changes:

* Remove deprecated `HashSet` encoding
* Minimum supported versions are now Erlang 24 and Elixir 1.12

Closes #105, #172, #191, #194, #199, #206, #207, #214, #217, #222.
This was referenced Jun 9, 2024
@devinus devinus closed this as completed Jun 9, 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

No branches or pull requests

5 participants