go icon indicating copy to clipboard operation
go copied to clipboard

Cycle check

Open aachex opened this issue 4 months ago • 0 comments

As described in issue https://github.com/json-iterator/go/issues/696, cyclic dependencies between structs cause a stack overflow. In this PR, I have added a hasCycle(v) function to check an object for cycles before marshaling it.

aachex avatar Sep 07 '25 10:09 aachex