--i
> --
> You received this message because you are subscribed to the Google Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com.
> To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.
>
>
Sent from my iPhone
On Wed, Dec 1, 2010 at 12:08, metamind <no...@craft-e.com> wrote:
> it choked on circular refs.
it choked on circular refs.
> How would you expect a JSONifier that doesn't choke on circular refs to work?
> Like, what is the 'non-choking' way to stringify A after executing 'a={};a.a=a;'?
For sys.inspect() ( now util.inspect() ) I'd like it to be so:
{ a: this } , { a: self } , { a: c'est } , { a: esto } , { a: das } ...
a= { a: [ {}, 27 ] }; a.b= a.a; a.c= a.a[0]; a.d= a.a[1];
{ a: [ {}, 27 ], b: this.a, c: this.a[0], d: 27 }
--
Jorge.
--
No, it isn't, but sys^H^H^Hutil.inspect() is not a JSON.stringify()er...
--
Jorge.
JSONView can't collapse non-JSON output. If you want JSON compatible
output, use JSON.stringify.
If you want it to handle circular links and other odd things in a
different way, then provide a translator function.
JSON.stringify(myCrazyObject, translatorFunction, indentation)
--i