Particular / NServiceBus

Build, version, and monitor better microservices with the most powerful service platform for .NET
https://particular.net/nservicebus/
Other
2.1k stars 647 forks source link

XML serializer can't handle recursive enumeration types #4715

Open SzymonPobiega opened 7 years ago

SzymonPobiega commented 7 years ago

Types that implement IEnumerable of themselves cause XML serializer to boom with StackOverflowException. An example is JToken:

Assert.IsTrue(typeof(IEnumerable<JToken>).IsAssignableFrom(typeof(JToken)));

The problematic line is 54 in XmlSerializerCache.

timbussmann commented 7 years ago

@SzymonPobiega as you assigned this yourself, are you actively doing something related to this issue?

SzymonPobiega commented 7 years ago

@timbussmann Nope. I've assigned it to not lose it. Feel free to un-assign me.

boblangley commented 3 years ago

We have triaged this issue and will be considering it for inclusion in one of the upcoming maintenance releases for this package.