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

Definition

Namespace SharpYaml
Assembly SharpYaml.dll

Attempts to deserialize YAML from a text reader using an explicit destination type and generated metadata from a serializer context.

public static bool TryDeserialize(TextReader reader, Type returnType, YamlSerializerContext context, scoped out object? value)

Parameters

reader
TextReader

The source reader.

returnType
Type

The destination CLR type.

context
YamlSerializerContext

The source-generated serializer context.

value
Object

The deserialized value when successful; otherwise null.

Returns

Boolean
true when deserialization succeeded; otherwise false.