I'm sure I'm getting things wrong, since it is widely used, but this test fails for me:
using YamlDotNet.Serialization;
using YamlDotNet.Serialization.NamingConventions;
class Test
{
public int Value { get; set; }
}
public class Program
{
public static void Main()
{
var deserializer = new DeserializerBuilder().
WithNamingConvention(PascalCaseNamingConvention.Instance)
.Build();
//throws : YamlDotNet.Core.YamlException: 'Property 'value' not found on type 'Test'.'
var result = deserializer.Deserialize<Test>("value: 25");
}
}
What I expect is propery Value is assigned from 'value' since I'm using PascalCaseNamingConvention... However I digged in the library code, and at afirst and not extremely deep glance it looks the convention is not used in property lookup.