I have an array of objects with some cyclic references. To handle this, I used JSON.decycle when sending the object via JSON and JSON.retrocycle on the receiving end.
For example:
var refactor_data = JSON.retrocycle(JSON.parse(event.data));
The issue is that some objects in 'refactor_data' have transformed JSONPath references while others do not, and I am unable to determine why.
The objects are quite large, but I can provide a sample if necessary.
EDIT:
Here is a sample of a functional object: http://pastebin.com/1hZDCipn
And here is a sample of a malfunctioning object: http://pastebin.com/PfYCkrGt
EDIT2: It seems like objects with replaced references are actually the originals, and retrocycle may not be making any changes to them. Could this be due to their deep placement within the object structure?
EDIT3: I attempted to execute the eval function that retrocycle should run in FireBug: (It's normal for this to fail)
EDIT4: I inserted a console.log statement within the JSON.retrocycle function, and eval() returns the correct object. However, the returned JSON and the original JSON remain unaltered.
Thank you.