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

Make encoder protocols overridable #109

Open
thousandsofthem opened this issue Dec 26, 2016 · 3 comments
Open

Make encoder protocols overridable #109

thousandsofthem opened this issue Dec 26, 2016 · 3 comments

Comments

@thousandsofthem
Copy link

Poison is allowing to define custom implementations for encoding specific data types.
However, if implementation already defined by poison itself, e.g.
https://github.com/devinus/poison/blob/master/lib/poison/encoder.ex#L337
then re-defining it produces nasty-looking warning
e.g.

warning: redefining module Poison.Encoder.DateTime (current version loaded from _build/dev/lib/poison/ebin/Elixir.Poison.Encoder.DateTime.beam)
  lib/protocols/dates.ex:1

Is there a way to avoid that?

(Use-case: need specific datetime format for json api)

@rohfosho
Copy link

This is also prevents exrm or distillery from building a binary of your elixir app.

@tanweerdev
Copy link

anyone update on this one?

@cj1128
Copy link

cj1128 commented Sep 24, 2018

Any update ? Override default protocol implementation should be easy to do, it's common in JSON api.

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

4 participants