TryDeserialize(String, Type, out Object?, TomlSerializerOptions?) Method

Definition

Namespace Tomlyn
Assembly Tomlyn.dll

Attempts to deserialize a TOML payload from text into an explicit destination 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 bool TryDeserialize(string toml, Type returnType, scoped out object? value, TomlSerializerOptions? options = null)

Parameters

toml
String
returnType
Type
value
Object

Returns