Closed akshaysarode31 closed 1 month ago
Try removing the WithNamingConvention
from your DeserializerBuilder
@EdwardCooke This helped Thank you. Just out of curiosity how was WithNamingConvention
causing the issue?
The naming conventions aren’t the most reliable when deserializing. It is a bit surprising that it didn’t work because it looked like it should have based on the yaml and property names.
I realized why it didn’t work and why the error was confusing. When the error said Type
with the capital T
it was referring to the key in the yaml. Not the property on the class. With camel case naming convention it was expecting the key to be type
in the yaml with a lowercase t
.
I’m closing this since it’s complete.
I realized why it didn’t work and why the error was confusing. When the error said
Type
with the capitalT
it was referring to the key in the yaml. Not the property on the class. With camel case naming convention it was expecting the key to betype
in the yaml with a lowercaset
.I’m closing this since it’s complete.
This makes sense. Thank you looking back into this.
Below is my Selectors.yaml
While running this code at line
var selectors = deserializer.Deserialize<Dictionary<string, Dictionary<string, Selector>>>(reader);
I am getting errorCould you please help me with this and suggest what wrong I am doing here?