On Mar 5, 2012, at 11:50 AM, 程劭非 wrote: > Hi, everyone, > > As you know, JSON API will throw a syntax error when trying to stringify a > object with circular reference.But indeed the feature > "serializing/unserializing object with circular reference" is needed.(eg. > when storing a graph,or status machine) >
This could interest you: https://github.com/xk/JASON JASON is just like JSON, but unlike JSON it can: • serialize objects with methods • serialize objects with cyclic references • understand Dates, Regexps, Booleans, etc, and restore them with .parse() with their proper types/classes. • understand and serialize all the JS primitives, including undefined • properly recreate the holes in Arrays -- Jorge. _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

