JSON cycle detection