{ a: path(/a2), // yes, path(/a2) is a object a2: {c: 1, d: path(../b/d)}, // no, path(/b) is a path itself you will get undefined here. b: path(/b2), //yes, path(/b2) is a object b2: {c: path(../a/c), d: 2}, // no path(../a) is a path itself you will get undefined here. }
In general, I mean a path will never refer to a object specified by a path. 2012/3/5 Andreas Rossberg <rossb...@google.com> > On 5 March 2012 13:20, 程劭非 <csf...@gmail.com> wrote: > > JSON.stringfyEx will never produce text like this but JSON.parseEx accept > > this form. > > > > I mean > > { > > a:11, > > b:path(/a) > > } > > will act all the same with > > { > > a:11, > > b:11 > > } > > Do you expect > > { > a: path(a2), > a2: {c: 1, d: path(../b/d)}, > b: path(b2), > b2: {c: path(../a/c), d: 2}, > } > > to work? Even ignoring the issue with circularities, you would need to > do (deep) dependency analysis before initialising individual > properties. > > /Andreas >
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss