-
Notifications
You must be signed in to change notification settings - Fork 28
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
Extend LOAD_KEYS_CASE_INSENSITIVELY to support something like snake_case #40
Comments
@monchi What's your preferred solution? What about adding a pair of functions P.S. You can explicitly specify the name to workaround it now: private val exampleKey by required<String>("example_key") |
@uchuhimo |
@monchi I got it. I will consider implementing it in the next release. A pull request is welcome if you are willing to contribute. Since I maintain Konf part-time, there may be some delay before the next release. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 30 days if no further activity occurs, but feel free to re-open a closed issue if needed. |
@monchi I have released a new version v0.23.0 that implements the desired behavior. You can try it now. Any further feedback is welcome. |
Please think about following example code.
With the code above, We can load:
But we cannot load with error:
Exception in thread "main" java.util.concurrent.ExecutionException: com.uchuhimo.konf.UnsetValueException: item indentStyle is unset
It's very nice if both CamelCase and snake_case are supported, especially when we load config from multiple file type such as json and yaml.
The text was updated successfully, but these errors were encountered: