TryDeserialize(String, out T?, YamlSerializerOptions?) Method

Definition

Namespace SharpYaml
Assembly SharpYaml.dll

Attempts to deserialize a YAML payload from text.

public static bool TryDeserialize<T>(string yaml, scoped out T? value, YamlSerializerOptions? options = null)

Type parameters

T
The destination CLR type.

Parameters

yaml
String

The YAML payload.

value
{T}

The deserialized value when successful; otherwise default.

options
YamlSerializerOptions

The serializer options. If null, Default is used.

Returns

Boolean
true when deserialization succeeded; otherwise false.