Subj : Serializing JavaScript in spidermonkey To : netscape.public.mozilla.jseng From : Marcello Bastea-Forte Date : Tue Dec 30 2003 08:19 pm Hey, I'd like to serialize a javascript object to a file, and I was wondering if anyone has done this, and if there was any 'best' way to do it. I don't need support for serializing objects (like functions and stuff) other than some type of recursive property scanning and rebuilding. Basically I want to store a recursive hashtable of the data (for a game save state file). I was thinking of using JS_Enumerate, and then writing that out to a file (or maybe even generating javascript code, so reading in is easier), then for all the basic types, doing JS_ValueToString, and for objects, just a recursive call. So ya, I was wondering what ways people might suggest. (Or if there is some built-in way I didn't see?) Thanks, Marcello .