Cycling and decycling of JavaScript objects into and from JSON