kevin-montrose / Jil

Fast .NET JSON (De)Serializer, Built On Sigil
MIT License
2.15k stars 253 forks source link

Stackoverflow Exception while deserializing to a non-recursive complex class #335

Open hkothoju opened 5 years ago

hkothoju commented 5 years ago

In the real world scenario, these are the classes that we want to deserialize: https://github.com/hkothoju/JilBugExample/blob/master/TestClasses/TestClasses.cs

JIL throws a "Stackoverflow Exception" while deserializing this class, in both asp.net core project and in asp.net 4.6.1. Both projects in the repo are not touched anymore than to add JIL and the test classes.

Steps to run locally and reproduce:

You can change the startup project to the other and do that same. The exception below is thrown.

image

JIL had worked well for us, but this issue popped up when we added some extra members to a class. If there is a workaround, please provide that so that we can make this work meanwhile.