Table of Contents

YamlMergeKeyBehavior Enum

Definition

Namespace
Bodu.Text.Yaml
Assembly
Bodu.Text.Yaml.dll
Package
Bodu.Text.Yaml 1.3.0
Source
YamlMergeKeyBehavior.cs

Specifies how the reader treats the YAML merge key (<<).

public enum YamlMergeKeyBehavior
Extension Methods

Fields

Expand = 0

Expand a << entry by merging the referenced mapping's keys, with existing keys taking precedence. This is the default. Only the plain, untagged key << is a merge key; its value must be a mapping or a sequence of mappings, and a mapping may hold only one merge key. A merged mapping that has a merge key of its own is expanded first, so it contributes the keys its own merge supplies.

Disabled = 1

Disable merge-key handling; a << entry is retained as an ordinary mapping key.

PreserveAsNormalKey = 2

Retain a << entry as an ordinary mapping key without expanding it. Equivalent to Disabled in the produced tree, expressing the intent to preserve rather than process the key.

Remarks

The merge key is a YAML 1.1 working-draft feature and is not part of the YAML 1.2 core schema. It is supported as a compatibility convenience, expanded by default under either specification version to match common configuration usage (the default is Expand), and it can be disabled so that << is treated as an ordinary key.

Applies to

ProductVersions
.NET8, 10