YamlDocumentOptions Struct
Definition
Provides options that configure how a YamlDocument parses YAML source.
public struct YamlDocumentOptions
- Inherited Members
- Extension Methods
Properties
DuplicateKeyBehavior
Gets or sets the policy applied when a mapping declares the same key more than once.
public YamlDuplicateKeyBehavior DuplicateKeyBehavior { readonly get; set; }
Property Value
- YamlDuplicateKeyBehavior
The duplicate-key policy; the default is Throw.
MaxDepth
Gets or sets the maximum container nesting depth permitted while parsing.
public int MaxDepth { readonly get; set; }
Property Value
- int
The maximum depth. A value of zero or less selects the default of 64. Larger values are clamped to the implementation ceiling.
Remarks
Only sequences and mappings count toward the depth, in flow and block style alike, so a maximum depth of N admits N nested collections with a scalar at the deepest level. Input nested deeper throws YamlFormatException.
MergeKeyBehavior
Gets or sets the policy applied to the YAML merge key (<<).
public YamlMergeKeyBehavior MergeKeyBehavior { readonly get; set; }
Property Value
- YamlMergeKeyBehavior
The merge-key policy; the default is Expand.
SpecVersion
Gets or sets the YAML specification version whose implicit type resolution is applied to plain scalars.
public YamlSpecVersion SpecVersion { readonly get; set; }
Property Value
- YamlSpecVersion
The specification version; the default is V1_2.
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |