Serialize(TextWriter, Object?, Type, TomlSerializerOptions?) Method

Definition

Namespace Tomlyn
Assembly Tomlyn.dll

Serializes a value to a writer using an explicit input type.

[RequiresUnreferencedCode("Reflection-based TOML serialization is not compatible with trimming/NativeAOT. Use a source-generated TomlSerializerContext or pass a TomlTypeInfo instance.")]
[RequiresDynamicCode("Reflection-based TOML serialization is not compatible with trimming/NativeAOT. Use a source-generated TomlSerializerContext or pass a TomlTypeInfo instance.")]
public static void Serialize(TextWriter writer, object? value, Type inputType, TomlSerializerOptions? options = null)

Parameters

writer
TextWriter
value
Object
inputType
Type