DuplicateKeyBehavior
Definition
Namespace: Corvus.Yaml
Assembly: Corvus.Text.Json.dll
Specifies the behavior when duplicate mapping keys are encountered.
public enum DuplicateKeyBehavior : IComparable, ISpanFormattable, IFormattable, IConvertible
Implements
IComparable, ISpanFormattable, IFormattable, IConvertible
Fields
| Field | Type | Description |
|---|---|---|
Error static |
DuplicateKeyBehavior |
Throw a YamlException when a duplicate key is encountered (default). YAML 1.2 says mapping keys SHOULD be unique. |
LastWins static |
DuplicateKeyBehavior |
The last value for a duplicate key wins. Earlier values are silently overwritten. This matches the behavior of many YAML 1.1 implementations. |
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests.
Open an issue