Loading ...
Sorry, an error occurred while loading the content.

Re: Treeview - recursive data structure

Expand Messages
  • markchambersobjectmastery
    ... Hi Adam, It s not recursion per se, JSON can t cope with a loop in the network of objects. I m surprised that such a loop is necessary. Do you know what
    Message 1 of 5 , Feb 23, 2006
    • 0 Attachment
      --- In ydn-javascript@yahoogroups.com, Adam Moore <adamoore@...> wrote:
      >
      > On Tue, Feb 21, 2006 at 11:24:35PM -0000, markchambersobjectmastery
      wrote:
      > >
      > > var str = JSON.stringify(tree); ... this is where it happens.
      >
      > Hi Mark, the ability to use JSON to serialize a tree instance would be a
      > great feature. You are correct that JSON can't process a tree instance
      > directly because of the use of recursion. Adding functions to distill a
      > tree instance into a JSON structure, and to recreate a tree from this
      > structure is being considered for a future release.
      >
      > Thanks,
      >
      > -Adam
      >


      Hi Adam,

      It's not recursion per se, JSON can't cope with a loop in the network
      of objects. I'm surprised that such a loop is necessary. Do you know
      what the offending property item is? Is there a (relatively) easy way
      to take it out?

      Regards,
      Mark Chambers
    Your message has been successfully submitted and would be delivered to recipients shortly.