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

Proposal: Add Oban.json_library/0 #1213

Closed
wants to merge 2 commits into from

Conversation

thiamsantos
Copy link
Contributor

Elixir 1.18 introduced official JSON support.

This PR adds support to configure the json library used by Oban, in order to allow the use of the official JSON module.

By default Oban will keep using Jason.

The code is adapted from Phoenix.

@sorentwo sorentwo closed this in c1f996e Jan 4, 2025
@sorentwo
Copy link
Member

sorentwo commented Jan 4, 2025

@thiamsantos Thanks for the PR and nudging us towards using the new JSON module. When Phoenix added the json library config it was to help migrate from the Poison to Jason library. Now, we're migrating to an official module that's included in the language itself and won't need to support alternatives once the minimum supported Elixir version is v1.18.

Our alternative strategy was to add a wrapper that delegates to the best option at compile time.

@sorentwo sorentwo added kind:enhancement New feature or request area:oss Related to Oban OSS labels Jan 4, 2025
@thiamsantos
Copy link
Contributor Author

@sorentwo thank you ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:oss Related to Oban OSS kind:enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants