----- Original Message ----- From: "Lachlan Hunt" <[EMAIL PROTECTED]> To: "Douglas Crockford" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, November 03, 2006 10:16 AM Subject: Re: [whatwg] JSON encoding
| Douglas Crockford wrote: | >> I think the hazard is very real and very serious. | >> I don't see any additional expressiveness enabled by toJSONString. | > | > This is a convenience issue. Having toJSONString as a builtin is a | > convenience, removing the need to load json.js. | | How is toJSONString() any different from toSource()? | | http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object:toSource | JSON ( http://json.org/ ) is a limited set of JS (literals). toSource does not work in almost all cases related to object serialization. In particular this { one:1 } is not valid in JSON but this { "one":1 } is acceptable. Andrew Fedoniouk. http://terrainformatica.com
