-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
JSON vs Jason incompatibility #14317
Comments
We don't aim to be 100% Jason compatible but we should discuss if we want to add this feature. Thoughts @michalmuskala? In this case, I think folks could explicitly convert to binary, since I believe this is what Jason does anyway. |
I think the risk here is people like me just plug ‘JSON’ into every lib’s ‘json_library:’ config and expect it to (ideally!) work. Perhaps an educational piece is missing for either library authors or library consumers that things aren’t necessarily interchangeable. |
Right, what I am saying is that it is an unreasonable expectation and we should not do changes based solely on that, because even if we made charlists work, then something else will fail. We should make the decision that is best aligned with JSON itself, considering Jason compatibility as one of the factors. |
I like the idea of adding an admonition block to state the non-goals for |
Generally I am not in favor of saying things that we don't do in the documentation. Because there are one thousand things we don't do. We aren't fully compatible with Jason, we are not compatible with the |
A separate but real world data point:
Trying to use I think this supports the idea that cross compatibility is an unreasonable expectation, and we'll need library authors to explicitly upstream support for |
I think maybe we could consider an explicit error (not a |
Couple points to consider here. |
Elixir and Erlang/OTP versions
Erlang/OTP 27 [erts-15.2.3] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1] [jit]
Elixir 1.18.3 (compiled with Erlang/OTP 27)
Operating system
Mac OS
Current behavior
Expected behavior
I'm having issues with third party modules causing crashes when trying to switch to JSON.
Should JSON decode a charlist for Jason compatibility?
The text was updated successfully, but these errors were encountered: