Re: [WebIDL] toJSON

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