You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
configure json_library to be JSON if defined #6461
I would love to have the json_library option configurable beyond Jason and json. I am the maintainer of glazer, and believe it would be very beneficial for the Phoenix community to take advantage of more performant JSON parsing libraries when needed.
(And I think we don’t event use all those. You can grep the code for json_library().)
You already have encode and decode, so you’re only missing the iodata variants. Of course you could add a wrapper module that just calls encode in that case, as a binary is iodata, but that might not be as efficient.
Activity
saleyn commentedon Jun 14, 2026
I would love to have the
json_libraryoption configurable beyondJasonandjson. I am the maintainer of glazer, and believe it would be very beneficial for the Phoenix community to take advantage of more performant JSON parsing libraries when needed.SteffenDE commentedon Jun 15, 2026
@saleyn You can configure any library you want as long as it has the same API: https://elixir.hexdocs.pm/JSON.html#functions
(And I think we don’t event use all those. You can grep the code for
json_library().)You already have encode and decode, so you’re only missing the iodata variants. Of course you could add a wrapper module that just calls encode in that case, as a binary is iodata, but that might not be as efficient.
rhcarvalho commentedon Sep 4, 2026
@SteffenDE this was solved by #6481.