Environment:
- Newtonsoft.Json 13.0.3,
- Syncfusion.DocIO.AspNet.Mvc5 28.2.6
- dotnet framework 4.2.6.
Issue: I'm trying to convert a WordDocument object to JSON, following the example provided here. However, I encountered the following error:
Newtonsoft.Json.JsonSerializationException: 'Self referencing loop detected for property 'Document' with type 'Syncfusion.DocIO.DLS.WordDocument'. Path 'Data.Footnotes.Separator.Paragraphs[0].ChildEntities[0].CharacterFormat'.'
Attempts to Resolve:
- ReferenceLoopHandling.Ignore: This setting caused a memory leak, eventually leading to the program being killed by the OS.
- ReferenceLoopHandling.Serialize: This setting resulted in a stack overflow.
- PreserveReferencesHandling.Objects: This setting did not resolve the self-referencing exception.
Could you please help me solve this problem? Any guidance or suggestions would be greatly appreciated. Thank you in advance!