Skip to content

Preserve Merge Keys #196

Open
Open

Description

@camitz

There seems to be no way I can preserve merge keys.

With or without -UseMergeParser, I can't roundtrip this.

default: &default
  value1: 1
  value2: 2

hoge:
  <<: *default
  value3: 3
"@

Activity

  1. gabriel-samfira commented on Jan 5, 2026

    @gabriel-samfira
    Member

    Hi @camitz

    The merging parser is responsible for deserialization. We would need to create a serializer that is able to preserve merge keys. But that is somewhat difficult to handle.

    Given the little time I have to dedicate to this project, I barely sqeezed through the holidays this pr:

    which adds round-trip support for most cases (not merge keys/anchors though).

    So I make no promises for as to when this will ever be added. If you do have time to help with this, it would be amazing.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions