Skip to content

Map "deep" merge only adds new items, but not override existing values #1844

Closed
@alinakovalenko

Description

@alinakovalenko

I read 2 configs one by one:
1:

key:
1: 1
2: 2
3: 3

2:

key:
1: 2
2: 3
4: 5

I specified JsonMerge for a Map<Integer, Integer> property and as a result got:
{1: 1, 2: 2, 3: 3, 4: 5}

But I expected:
{1: 2, 2: 3, 3: 3, 4: 5}

Without JsonMerge I got:
{1: 2, 2: 3, 4: 5}

Update:
Map<String, Integer> works properly - I got expected result

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions