Solving “A possible object cycle was detected”. in .NET
To solve the problem: System.Text.Json.JsonException: A possible object cycle was detected. This can either be due to a cycle or if the object depth is larger than the maximum allowed depth of 32. Consider using ReferenceHandler.Preserve on JsonSerializerOptions to support cycles. There are at least two options: Remove circular references. Ignore circular references. The easy […]