Skip to content
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

Option to overwrite rather than merge HashMaps #431

Open
aeheathc opened this issue Apr 1, 2023 · 0 comments
Open

Option to overwrite rather than merge HashMaps #431

aeheathc opened this issue Apr 1, 2023 · 0 comments

Comments

@aeheathc
Copy link

aeheathc commented Apr 1, 2023

I have multiple config sources. For most data types, when a field is available from multiple sources, there's an order of precedence for which one to use. However, one of the fields in my settings struct is a HashMap. I have found that when this field is available from multiple config settings, the HashMaps are merged together, where keys from both sources are present in the deserialized output. I would prefer that one whole HashMap overrides another, to bring the behavior in line with that of the primitive types. Or, at least have an option I can call on the ConfigBuilder to ask for this behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants