Table of Contents

YamlScalarStyle Enum

Definition

Namespace
Bodu.Text.Yaml
Assembly
Bodu.Text.Yaml.dll
Package
Bodu.Text.Yaml 1.0.0
Source
YamlScalarStyle.cs

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 = 0

Lets the writer select the most compact valid style for the content. Used as the default when a style is not specified.

Plain = 1

The plain (unquoted) style. The content carries no delimiters and is subject to implicit type resolution.

SingleQuoted = 2

The single-quoted style. Only the single quote is escaped, by doubling; no other escape sequences are processed.

DoubleQuoted = 3

The double-quoted style. Supports the full set of backslash escape sequences.

Literal = 4

The literal block style (|). Line breaks within the content are preserved verbatim.

Folded = 5

The 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

ProductVersions
.NET8, 10