Use JSON, if it exists, otherwise fallback to Jason#75
Use JSON, if it exists, otherwise fallback to Jason#75joshk wants to merge 1 commit intophoenixframework:mainfrom
JSON, if it exists, otherwise fallback to Jason#75Conversation
JSON if it existsJSON, if it exists, otherwise fallback to Jason
|
Hi @joshk!! We definitely want to do this but, because we cannot require v1.18 (it is too new), we need to depend on Jason anyway, so there isn't much benefit. My suggestion is to simply replace Jason by JSON in the future, but we will probably have to wait two years for doing so. Other than that, I hope you are doing well and happy holidays! |
|
@josevalim I understand we can't require using latest |
|
Optional dependencies are not installed by default, which means that if we make Jason optional, all projects that depend on |
I'm unsure if this is the best approach, so consider this more of a draft than a complete solution.
The intent is to use the
JSONmodule from Elixir 1.18.x instead ofJason, but I've kept theJasondep as the fallback.I do think it would be better to have
Jasonas an optional dep and have the project which is usingEsbuildincludeJasoninstead, but this would also require changes when creating new Phoenix projects to make sureJasonis added in the deps.