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

Definition

Namespace SharpYaml
Assembly SharpYaml.dll

Attempts to deserialize YAML from a text reader.

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

Type parameters

T
The destination CLR type.

Parameters

reader
TextReader

The source reader.

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.