-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Nested keys are case sensitive ? #131
Comments
Hi, I'm also hitting the same problem. I think this can fix the issue. |
I'm also hitting the problem. |
This fixed the issue. |
👍 |
knadh
added a commit
to knadh/viper
that referenced
this issue
Jan 25, 2019
YAML, TOML, and JSON dictate keys to be case-sensitive. Viper's default behaviour of lowercasing the keys for key insensitivity is incompatible with these standards and has the side effect of making it difficult for use cases such as case sensitive API credentials in configuration. For eg: MyApiKey=MySecret (in TOML). See spf13#131, spf13#260, spf13#293, spf13#371, spf13#373 This commit adds a global function `viper.SetKeyCaseSensitivity()` that enables this behaviour to be turned off, after which, all keys, irrespective of nesting, retain their cases. This respects all configuration operations including getting, setting, and merging.
knadh
added a commit
to knadh/viper
that referenced
this issue
Jan 29, 2019
YAML, TOML, and JSON dictate keys to be case-sensitive. Viper's default behaviour of lowercasing the keys for key insensitivity is incompatible with these standards and has the side effect of making it difficult for use cases such as case sensitive API credentials in configuration. For eg: MyApiKey=MySecret (in TOML). See spf13#131, spf13#260, spf13#293, spf13#371, spf13#373 This commit adds a global function `viper.SetKeyCaseSensitivity()` that enables this behaviour to be turned off, after which, all keys, irrespective of nesting, retain their cases. This respects all configuration operations including getting, setting, and merging.
knadh
added a commit
to knadh/viper
that referenced
this issue
Jan 29, 2019
YAML, TOML, and JSON dictate keys to be case-sensitive. Viper's default behaviour of lowercasing the keys for key insensitivity is incompatible with these standards and has the side effect of making it difficult for use cases such as case sensitive API credentials in configuration. For eg: MyApiKey=MySecret (in TOML). See spf13#131, spf13#260, spf13#293, spf13#371, spf13#373 This commit adds a global function `viper.SetKeysCaseSensitive()` that enables this behaviour to be turned off, after which, all keys, irrespective of nesting, retain their cases. This respects all configuration operations including getting, setting, and merging.
This was referenced Aug 30, 2019
Closed
See #1014 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Seems that when I use for the next Json file:
the path "Bot.name" it does not work ...
but path "Bot.Name" works...
Should it be case insensitive on all levels??
The text was updated successfully, but these errors were encountered: