Table of Contents

TomlDecimalHandling Enum

Definition

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

Specifies how a decimal value is represented in TOML, which has no native decimal type.

public enum TomlDecimalHandling
Extension Methods

Fields

Float = 0

The decimal is written as a TOML float. Because TOML floats are IEEE 754 binary64 values, precision beyond roughly fifteen to seventeen significant digits is lost.

String = 1

The decimal is written as an invariant-culture TOML basic string, preserving its full precision and scale.

Remarks

The setting controls only how a decimal is written; on read the serializer accepts a TOML float, integer, or string regardless, so a document produced under one setting can be read under either.

Applies to

ProductVersions
.NET8, 10