YamlMergeKeyBehavior Enum
Definition
Specifies how the reader treats the YAML merge key (<<).
public enum YamlMergeKeyBehavior
- Extension Methods
Fields
Expand = 0Expand a
<<entry by merging the referenced mapping's keys, with existing keys taking precedence. This is the default.Disabled = 1Disable merge-key handling; a
<<entry is retained as an ordinary mapping key.PreserveAsNormalKey = 2Retain 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 an
opt-in compatibility convenience; the default is Expand to match common configuration usage, but it
can be disabled so that << is treated as an ordinary key.
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |