I've tried for a couple hours to convert the following object to JSON string:
car = {
go : function(){
alert('accelerating');
}
}
When I convert using JSON.stringify(car), it returns {}, because methods won't work with json strings. So I thought there must be some sort of hack for that.
My question is: What is the quickest way to transform this object into a string and then back to an object, keeping its methods?