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

Plan for Jason library after Erlang/OTP 27 added native support to JSON parsing #185

Open
prodis opened this issue May 24, 2024 · 2 comments

Comments

@prodis
Copy link
Contributor

prodis commented May 24, 2024

Hi @michalmuskala, do you have plans to consume the new Erlang json module in Jason for future versions?
https://www.erlang.org/blog/highlights-otp-27/#the-new-json-module

The Jason DSL with options, encoder protocol and the contract used by other libraries (Postgrex, Phoenix, Plug, etc) is handy.

The json module is faster, but I don't see me using this Erlang module directly in my applications in place of Jason.

@michalmuskala
Copy link
Owner

michalmuskala commented May 24, 2024

The plan right now is to make a proposal for the Elixir standard library to include an Elixir wrapper around json with encoder protocol and interface more similar to Jason that's easy to use from Elixir.

When this is integrated the Jason library itself would become deprecated.

@vanderhoop
Copy link

vanderhoop commented May 26, 2024

The plan right now is to make a proposal for the Elixir standard library to include an Elixir wrapper around json with encoder protocol and interface more similar to Jason that's easy to use from Elixir.

When this is integrated the Jason library itself would become deprecated.

That approach makes sense long term. In the shorter term, does the approach above imply that there will be at least a 6-month window—until, say, Elixir 1.18—and possibly a 2-year window, until Elixir requires OTP 27+—in which there will be no drop-in solution for leveraging the new json module's performance gains globally in Phoenix?

If the answer is yes, it might make sense to rally the community around conditionally leveraging the json module in Jason if the former is available, as that would provide a sensible bridge to the desired future state.

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

3 participants