YamlReaderOptions
Definition
Namespace: Corvus.Yaml
Assembly: Corvus.Text.Json.dll
Options for configuring the YAML to JSON converter.
public readonly struct YamlReaderOptions
Constructors
| Constructor | Description |
|---|---|
| YamlReaderOptions() | Initializes a new instance of the YamlReaderOptions struct with default values. |
Properties
| Property | Type | Description |
|---|---|---|
| DocumentMode | YamlDocumentMode |
Gets the document mode specifying how multi-document streams are handled. Defaults to SingleRequired. |
| DuplicateKeyBehavior | DuplicateKeyBehavior |
Gets the behavior when duplicate mapping keys are encountered. Defaults to Error. |
| MaxAliasExpansionDepth | int |
Gets the maximum depth for alias expansion to prevent exponential expansion attacks (billion laughs). Defaults to 64. |
| MaxAliasExpansionSize | int |
Gets the maximum total number of nodes that can be produced by alias expansion. Defaults to 1,000,000. |
| Schema | YamlSchema |
Gets the YAML schema to use for tag resolution and scalar type coercion. Defaults to Core. |
Fields
| Field | Type | Description |
|---|---|---|
Default static |
YamlReaderOptions |
Gets the default options: Core schema, single-document required, error on duplicate keys, max alias expansion depth of 64, max alias expansion size of 1,000,000 nodes. |
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