YamlDuplicateKeyPolicy
OfficeIMO.Yaml
How YamlDocument treats a mapping that contains two equal keys. Without an explicit policy, loads use YamlDuplicateKeyPolicy.LastWins, and strict loads (YamlLoadOptions.Strict) use YamlDuplicateKeyPolicy.Error.
Inheritance
- Enum
- YamlDuplicateKeyPolicy
Usage
Explore 4 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 4
Inherited Methods
public string ToString(IFormatProvider? provider) #Obsolete("The provider argument is not used. Use ToString() instead.")Parameters
- provider IFormatProvider?
Returns
stringpublic string ToString(string? format, IFormatProvider? provider) #Obsolete("The provider argument is not used. Use ToString(String) instead.")Parameters
- format string?
- provider IFormatProvider?
Returns
stringValues
public const YamlDuplicateKeyPolicy Error #The load fails with YamlErrorCodes.DuplicateKey, as the YAML specification requires. Strict loads use it by default.
0public const YamlDuplicateKeyPolicy FirstWins #The load succeeds; key lookups return the first of the equal keys, and each later one is reported as a warning diagnostic.
1public const YamlDuplicateKeyPolicy LastWins #The load succeeds; key lookups, paths and the serializer use the last of the equal keys, as PyYAML, go-yaml v2 and SharpYaml do, and each later one is reported as a warning diagnostic. Non-strict loads use it by default.
2