Skip to content

Merge key order #484

@azat

Description

@azat

Looks like the order is wrong for merge key

input

# $ cat /tmp/test5-simplified.yaml
base_1: &base_1
  a: 10
  b: 10
base_2: &base_2
  b: 20
k1:
  !!merge <<: *base_1
  !!merge <<: *base_2

ryml

$ tools/ryml-parse-emit -j /tmp/test5-simplified.yaml  | jq .k1
reserving capacity=9
{
  "a": 10,
  "b": 10
}

yq

$ yq 'explode(.)' /tmp/test5-simplified.yaml
base_1:
  a: 10
  b: 10
base_2:
  b: 20
k1:
  a: 10
  b: 20

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions