TryDeserialize(Stream, out T?, TomlSerializerOptions?) Method

Definition

Namespace Tomlyn
Assembly Tomlyn.dll

Attempts to deserialize a TOML payload from a stream using UTF-8 encoding.

[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 bool TryDeserialize<T>(Stream stream, scoped out T? value, TomlSerializerOptions? options = null)

Type parameters

T

Parameters

stream
Stream
value
{T}

Returns