Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesnt handle deserializing to nullable enums #550

Closed
onionhammer opened this issue Dec 7, 2020 · 1 comment
Closed

Doesnt handle deserializing to nullable enums #550

onionhammer opened this issue Dec 7, 2020 · 1 comment

Comments

@onionhammer
Copy link

Since version 9.x, YamlDotNet no longer supports deserializing to a nullable enumerable property.

Could be related to here?

Example model:

public class MyModel
{
   public string Name { get; set; }
   public SomeEnum? MyValue { get; set; }
}

public enum SomeEnum
{
   ValueOne,
   ValueTwo
}

will not be able to be deserialized, will instead throw

 YamlDotNet.Core.YamlException : (Line: 16, Col: 7, Idx: 328) - (Line: 16, Col: 7, Idx: 328): No node deserializer was able to deserialize the node into type SomeEnum
@onionhammer
Copy link
Author

Closing as duplicate of #544

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant