Subj : Re: Changing Object.prototype.toSource to use double-quotes everywhere To : netscape.public.mozilla.jseng From : zwetan Date : Mon May 16 2005 11:57 pm > Object.prototype.toSource uses single-quoting around property ids that > are not lexical identifiers, but Douglas Crockford proposed today at the > AJAX Summit that it use double-quotes, as that's more JSON-like (JSON > specifies that all property ids are quoted, but I don't think we should > do that at this stage, without more testing and web-spidering). > > Just switching things so > > var o = {foo: "bar", '$#@%': 42}; > o.toSource() > > results in a string containing {foo:"bar", "$#@%":42} instead of > {foo:"bar", '$#@%':42} is a small change that should be easy to adapt > to, if any existing consumers of toSource output have come to depend on > single quotes being used, if any quoting is used, around property ids. > well, I code some code who can do as JSON but without the quote, that means you can use toSource() to serialize and a small parser to deserialize, if this can be insteresting I can post some code. zwetan .