-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Add TOML and JSON support for quarkus configuration #14330
Comments
cc @radcortez |
I would definitely be interested into working on this. As for |
I am fairly certain that @radcortez will want the core support to be in Smallrye Config. But let's see what he says |
I think it would be better if this works happens in SR Config. On the support itself, there are some limitations due to the MP Config API, namely treating every configuration as a single property key and value as String. This works fine for things like properties files, env, system properties, etc, but it is hard for I do have some ideas on how to improve this, but I think we should work on some prototype before proposing something to the spec. |
:) |
A first step however could be to provide s ConfigSource similar to what you have with YAML, right? Then ConfigProperties could use the same trick it does with for YAML to parse the value of the property for complex structures |
Yes. |
I would gladly test prototypes ! I have some real-world complex configurations as the one I sent to @geoand before for yaml. |
Here is a prototype: smallrye/smallrye-config#497 |
will test shortly! |
All additional configuration formats will be supported by https://github.com/quarkiverse/quarkus-config-extensions. I've created quarkiverse/quarkus-config-extensions#6 to track this and we will follow from there. |
Description
Quarkus supports java properties, JSON and YAML formats for configuration. Each of these, unfortunately suffers from either verbosity, obscurity or weak syntax validation for configuration purposes, as JSON and YAML are primarily data formats.
TOML emerges as the best format for configuration and it would be a wonderful addition to Quarkus. You can read about TOML here and why it is superior as configuration format.
I wish TOML can go all the way to MicroProfile Config as the preferred standard format.
Implementation ideas
There are several candidate implementations if you gogole "Java toml", for example toml.
@geoand
The text was updated successfully, but these errors were encountered: