YamlScalarStyle Enum
Definition
Specifies the presentation style of a YAML scalar node. The style controls how a scalar's content is delimited and escaped when emitted, and records how it was delimited when read.
public enum YamlScalarStyle
- Extension Methods
Fields
Any = 0Lets the writer select the most compact valid style for the content. Used as the default when a style is not specified.
Plain = 1The plain (unquoted) style. The content carries no delimiters and is subject to implicit type resolution.
SingleQuoted = 2The single-quoted style. Only the single quote is escaped, by doubling; no other escape sequences are processed.
DoubleQuoted = 3The double-quoted style. Supports the full set of backslash escape sequences.
Literal = 4The literal block style (
|). Line breaks within the content are preserved verbatim.Folded = 5The folded block style (
>). Single line breaks are folded into spaces, with blank lines preserved.
Remarks
The five styles correspond to the scalar presentations defined by the YAML specification. The two block styles (Literal and Folded) are valid only within block context; the flow styles (Plain, SingleQuoted, and DoubleQuoted) are valid in both block and flow context.
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |