You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using AOT (Vecc.YamlDotNet.Analyzers.StaticGenerator), if the model uses Uri, it fails on any input (Unhandled exception. (Line: 4, Col: 1, Idx: 41) - (Line: 4, Col: 8, Idx: 48): Exception during deserialization).
To Reproduce
[YamlStaticContext]publicpartialclassYamlContext;[YamlSerializable]publicclassMyModel{publicUriBaseUrl{get;set;}// public string BaseUrl { get; set; } // string is OK}vardeserializer=// new DeserializerBuilder() // without AOTnewStaticDeserializerBuilder(newYamlContext())// with AOT.Build();yaml=@"BaseURL: http://localhost.com";varmyModel=deserializer.Deserialize<MyModel>(yaml);// Exception
The text was updated successfully, but these errors were encountered:
That makes sense because it’s not a primitive type. There’s a lot of nuances with aot and the way it works with the limitations we have. To get around it you could create a type converter that outputs the scalar value and converts the read scalar back to a url object. There’s quite a few type converter examples in the code base I can point you to if you need.
Describe the bug
When using AOT (Vecc.YamlDotNet.Analyzers.StaticGenerator), if the model uses
Uri
, it fails on any input (Unhandled exception. (Line: 4, Col: 1, Idx: 41) - (Line: 4, Col: 8, Idx: 48): Exception during deserialization
).To Reproduce
The text was updated successfully, but these errors were encountered: