-
Notifications
You must be signed in to change notification settings - Fork 24
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
Use JSON5 (JSON for humans) for parsing configurations. #334
Comments
Here is a JSON5 Java implementation: https://github.com/marhali/json5-java?tab=readme-ov-file |
This could be a nice feature. I belive the built in jackson json parser could be tuned to match this behaviour: https://github.com/FasterXML/jackson-core/wiki/JsonReadFeatures |
Solves InseeFrLab#334 Implement features as described in fasterxml https://github.com/FasterXML/jackson-core/wiki/JsonReadFeatures
Saw that a custom object mapper was used. I took the liberty to provide a PR |
Let's go @johnksv, you're the man! |
This issue can be closed since it was merged in #344 |
Yes thanks! |
Note however that, as of today the region and catalog configuration are parsed as YAML in the values as opposed to onyxia-web where the env configuration are parsed as string (YAML is a superset of JSON). |
Hello,
I suggest switching from regular JSON to JSON5 for parsing the catalog and region configuration.
It's much better suited for the usecase.
It would be great if a trailing coma wouldn't prevent the API to start.
Also it would be very nice to be able to comment out part of the configuration if needed (Regular JSON does not support comments).
I use implemented this approach for the onyxia-web configuration already as explained here: https://youtu.be/NrVuVXsbloA?si=Fnu7sEwLuYl-t1uA&t=796
The text was updated successfully, but these errors were encountered: