TryDeserialize(Stream, Type, out Object?, YamlSerializerOptions?) Method

Definition

Namespace SharpYaml
Assembly SharpYaml.dll

Attempts to deserialize YAML from a stream using UTF-8 encoding and an explicit destination type.

public static bool TryDeserialize(Stream utf8Stream, Type returnType, scoped out object? value, YamlSerializerOptions? options = null)

Parameters

utf8Stream
Stream

The source stream.

returnType
Type

The destination CLR type.

value
Object

The deserialized value when successful; otherwise null.

options
YamlSerializerOptions

The serializer options. If null, Default is used.

Returns

Boolean
true when deserialization succeeded; otherwise false.