Class TomlSettings
Configuration settings for TOML serialization and deserialization operations.
public class TomlSettings
- Inheritance
-
TomlSettings
- Inherited Members
Examples
// Use default settings (TOML 1.1.0)
var defaultSettings = TomlSettings.Default;
// Create settings for TOML 1.0.0
var toml10Settings = new TomlSettings(TomlVersion.Toml10);
// Use settings in deserialization
var table = await TomlSerializer.DeserializeAsync(tomlContent, toml10Settings);
Remarks
TomlSettings allows you to configure TOML version compliance and other parsing/serialization behaviors. Use the static Default property to get settings with TOML 1.1.0 specification. Create a new instance with a specific TomlVersion for version-specific behavior.
Constructors
TomlSettings()
Initializes a new instance of the TomlSettings class with default TOML 1.1.0 settings.
public TomlSettings()
TomlSettings(TomlVersion)
Initializes a new instance of the TomlSettings class with the specified TOML version.
public TomlSettings(TomlVersion tomlVersion)
Parameters
tomlVersionTomlVersionThe TOML specification version to use.
Fields
Default
Gets the default TOML settings using TOML 1.1.0 specification.
public static readonly TomlSettings Default
Field Value
Properties
TomlVersion
Gets or sets the TOML specification version for parsing and serialization.
public TomlVersion TomlVersion { get; set; }
Property Value
Remarks
The default is Toml11.