Table of Contents

TomlSpecVersion Enum

Definition

Namespace
Bodu.Text.Toml
Assembly
Bodu.Text.Toml.dll
Package
Bodu.Text.Toml 1.0.0
Source
TomlSpecVersion.cs

Identifies the version of the TOML specification the reader enforces. The version controls a small number of grammar features that TOML v1.1.0 added relative to TOML v1.0.0.

public enum TomlSpecVersion
Extension Methods

Fields

V1_0 = 0

The TOML v1.0.0 specification. Inline tables must be single-line and free of trailing commas, time values must include seconds, and the \e and \xHH escapes are rejected.

V1_1 = 1

The TOML v1.1.0 specification. Adds the \e and \xHH escapes, optional seconds in time values, and multi-line and trailing-comma inline tables.

Remarks

The default is V1_0, which is the most widely deployed released specification. Selecting V1_1 additionally accepts the \e and \xHH string escapes, time values without seconds, and multi-line and trailing-comma inline tables.

The version affects only parsing. The writer always emits output that is valid under both versions, so it does not take a version.

Applies to

ProductVersions
.NET8, 10