Close review of Language Overview whitepaper

Kris Zyp kriszyp at
Thu Nov 15 10:24:37 PST 2007

On Nov 15, 2007 9:58 AM, Brendan Eich <brendan at> wrote:

> On Nov 15, 2007, at 9:17 AM, Kris Zyp wrote:
> > +1 from me. One request: When a filter function is provided to
> > JSON.parse, I would like the filter to be called with |this|
> > defined to be the root object that is being created by the parsed
> Interesting -- a short example would help sell this, I bet.
Example: one could write a reference resolving filter that could handle JSON
referencing schemes for circular references and such.
obj = JSON.parse('{child:{$ref:"this"}}',function(k,v) {
   return k=='$ref' ? eval(v) : v; // non-eval resolvers could be used, but
this is succint
obj.child==obj -> true
This is really not a very big deal, it is easy to walk the tree after parse
to accomplish the same thing, I just figured that when a filter is called,
|this| must be something, why not something of value?

My expanded ideas on JSON referencing (not really relevant to ES4, just
FYI): although
there are plenty of other ways to do it.
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the Es4-discuss mailing list