Take this object:
x = { \"key1\": \"xxx\", \"key2\": function(){return this.key1} }
If I do this:
y = JSON.parse( JSON.st
The naughty but effective way would be to simply:
Function.prototype.toJSON = function() { return this.toString(); }
Though your real problem (aside from modifying the prototype of Function) would be deserialization without the use of eval.
Function
eval