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

Definition

Namespace SharpYaml
Assembly SharpYaml.dll

Attempts to deserialize YAML from a text reader using an explicit destination type.

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

Parameters

reader
TextReader

The source reader.

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.