Skip to content

Option to overwrite rather than merge HashMaps #431

Open
@aeheathc

Description

@aeheathc

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions