Closed rube200 closed 1 month ago
Also everything works fine when a manully format it based on gen code
I tried it at hand and the following samples worked.
[YamlObject]
public partial class DictionaryMember
{
public Dictionary<string, object?>? Data { get; set; }
}
Can you give me the specific code that reproduces the problem?
Did you enable nullability? We have it in error mode I am one of maintainers of OpenMod, I am currently porting it from YamlDotNet to VYaml, if you really need I can try making an sample.
Ah, maybe I understand the problem.
If Data
is non-nullable, does that mean the following assign will give a warning?
Data = __Data__
Ok, I've fixed in #110.
If
Data
is non-nullable, does that mean the following assign will give a warning?
Yes I think that is the problem, in our case we get compilation error since we treat that warn as error.
Also can you add HashSet/Set ? To resolvers? It is very similar to list.
Also can you add HashSet/Set ? To resolvers?
I hope you'll give it a try.
Hi, i am trying to move from YamlDotNet to VYaml, but i am getting an hard time. Currently it forces me to manually create formatters instead of using YamlObject annotation. When i have
Dictionary<string, object?>? data;
it seems to not work, i got compilling errorCS8619
, looking at the pre gen code it creates internal varvar __Data__ = default(global::System.Collections.Generic.Dictionary<string, object>)
instead of the requested type.The problem seems to be
Dictionary<string, object>
instead ofDictionary<string, object?>