error during deserialization of a yaml file
I'm building a system that add the config file in the yaml format feature in my program, the program will throw this exception:
i will link the file in the message
21 Replies
this is what is written in the docs
Post the full stack trace of your error.
it's too long
$code
To post C# code type the following:
```cs
// code here
```
Get an example by typing
$codegif
in chat
For longer snippets, use: https://paste.mod.gg/use the paste site
thanks!
I'm guessing something failed with deserializing your model and that's why this is breaking
post the text in your yaml config file too
yessir
BlazeBin - atvyaayiqsav
A tool for sharing your source code with the world!
this is the error, and this is the file:
i want that the user is able to just put in the file only the configs he wants to change
also, some critique on your model:
There's no real reason to append
Config
to every single property name. Making your model like this (and adding the YamlMember
attributes) defeats the purpose of using:
thanks! yeah, i need to change that
Then you need to tell the deserializer that's what you want by using
IgnoreUnmatchedProperties
. It's failing to load because you only have 1 key in there.i modified it like this, but it still gives the same error message
in the error message isn't specified the exact line where the error accours, and this doesn't help me at all
It's working fine for me locally

mmmmmmmmmmmmmmmmmmmmmmmmmmmh, this is really strange, i have the code on github, do you want to see the entire codebase (this is the first big project that i make so don't judge me pls)?
no point in me digging through your entire codebase for a serialization problem
for starters, i would try fixing your config model and see if that changes anything
it's not really big tho, you can check the file really fast