W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2012

Re: [WebIDL] toJSON

From: Simon Pieters <simonp@opera.com>
Date: Thu, 31 May 2012 09:47:00 +0200
To: "public-script-coord@w3.org" <public-script-coord@w3.org>, "David Bruant" <bruant.d@gmail.com>
Message-ID: <op.we5w8mv9idj3kv@simons-macbook-pro.local>
On Wed, 30 May 2012 19:30:43 +0200, David Bruant <bruant.d@gmail.com>  
wrote:

> Hi,
>
> My reading of the current state of the spec is that
> JSON.stringify(anyEvent) is '{}' which is close to useless.

Why can't we change JSON.stringify() to make it not useless instead of  
sprinkling toJSON on everything?

> This is true
> for any WebIDL compliant object.
> ECMAScript 5 introduced JSON and the toJSON property. Could it be
> considered to make something useful out of WebIDL compliant objects
> using this property?
>
> David


-- 
Simon Pieters
Opera Software
Received on Thursday, 31 May 2012 07:46:54 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:06 UTC