Does YamlDotNet support deserializing a document where there are fields in the document that do not map to a field in the resulting object? For example:
Given a type:
public class Foo {
public string AField { get; set; }
}
If I use YamlDotNet's Deserialize on the following document it generates an exception:
Foo:
AField: This is a test
NotFoundField: This field is not supported yet
Looking at the YAML spec it should be allowable that the non-matching field should be ignored. Looking at the YamlDotNet code, it looks like it is assumed that the all fields in the document will map into the resulting object.
Is there an existing way to make the parsing "permissive" or am I going to need to modify YamDotNet to allow this?