Douglas crockford has a solution for this: <a href="https:&#x2F;&#x2F;github.com&#x2F;douglascrockford&#x2F;JSON-js&#x2F;blob&#x2F;master&#x2F;cycle.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;douglascrockford&#x2F;JSON-js&#x2F;blob&#x2F;master&#x2F;cycl...</a><p>It&#x27;s proven.. and written by the dude who invented JSON