jiffy
jiffy copied to clipboard
Add encode! and decode!
It would be really awesome to have Jiffy API fully compatible with Poison and ExJSX, so it can be used as a drop-in replacement in most of the projects.
Not sure what this would require from Jiffy? Is the api already the same and I just need to add the ! function names that proxy through to the existing encode/decode functions or are you asking for more API option equivalence stuff?
Adding !
functions would be a great start, but usually this means that functions without !
return {:ok, binary}
or {:error, reason}
(I guess {ok, Binary}
and {error, Reason}` in Erlang) tuples. Since this is a breaking change I guess you can consider it only on next major update.
Other option may be adding mix.exs
file and Elixir module, that will use existing Erlang jiffy implementation and provide a Poison-compatible interface, which won't break anything and will make using this package even simpler.
Do you know of an example for me to look at that gas the Elixir API layer? I've only skimmed over the intro tutorial so I'm not super familar with the ecosystem for that sort of mixed project. Not against adding such a thing just don't want to have it be a non-standard thing if possible.
On Thu, Jun 22, 2017 at 3:52 PM Andrew Dryga [email protected] wrote:
Adding ! functions would be a great start, but usually this means that functions without ! return {:ok, binary} or {:error, reason} (I guess {ok, Binary} and {error, Reason}` in Erlang) tuples. Since this is a breaking change I guess you can consider it only on next major update.
Other option may be adding mix.exs file and Elixir module, that will use existing Erlang jiffy implementation and provide a Poison-compatible interface, which won't break anything and will make using this package even simpler.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/davisp/jiffy/issues/147#issuecomment-310499255, or mute the thread https://github.com/notifications/unsubscribe-auth/AABN2TKZ8-IAzPLe-K8rDJzUBzHyzLb-ks5sGtQEgaJpZM4OA-S0 .
See #149