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

Definition

Namespace SharpYaml
Assembly SharpYaml.dll

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

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

Type parameters

T
The destination CLR type.

Parameters

utf8Stream
Stream

The source stream.

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.