Closed welbertwpg closed 2 months ago
Thanks for the easy reproduction code. I'll have a fix out in a bit. If there is no name set for the EnumMember
I'm planning on just using the name of the enum value.
This will go out in the next release in a couple of weeks.
This is released.
EnumMember
attribute without aValue
being specified. Exception details:1 visitor, TContext context, Stack
1 path, ObjectSerializer serializer)\r\n at YamlDotNet.Serialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.TraverseObject[TContext](IPropertyDescriptor propertyDescriptor, IObjectDescriptor value, IObjectGraphVisitor1 visitor, TContext context, Stack
1 path, ObjectSerializer serializer)\r\n at YamlDotNet.Serialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.Traverse[TContext](IPropertyDescriptor propertyDescriptor, Object name, IObjectDescriptor value, IObjectGraphVisitor1 visitor, TContext context, Stack
1 path, ObjectSerializer serializer)\r\n at YamlDotNet.Serialization.ObjectGraphTraversalStrategies.FullObjectGraphTraversalStrategy.YamlDotNet.Serialization.IObjectGraphTraversalStrategy.Traverse[TContext](IObjectDescriptor graph, IObjectGraphVisitor`1 visitor, TContext context, ObjectSerializer serializer)\r\n at YamlDotNet.Serialization.SerializerBuilder.ValueSerializer.SerializeValue(IEmitter emitter, Object value, Type type)\r\n at YamlDotNet.Serialization.Serializer.EmitDocument(IEmitter emitter, Object graph, Type type)\r\n at YamlDotNet.Serialization.Serializer.Serialize(IEmitter emitter, Object graph)\r\n at YamlDotNet.Serialization.Serializer.Serialize(TextWriter writer, Object graph)\r\n at YamlDotNet.Serialization.Serializer.Serialize(Object graph)\r\n at Program.To Reproduce The code below reproduces the issue:
Basically, create any enum with the
[EnumMember]
attribute and try to serialize an object with that.