Hi all,

I'm trying to get a JSON from an array that holds objects (which themselves
have member arrays that hold other classes). The hierarchy is this:

Array [Maps] 
               |
           Map      1 - *  Feature Presentations  * - 1 Feature Layer
                         1 - * Raster Presentations    * - 1 Raster Layer

So 1 Map has two arrays, one each for Feature and Raster Presentations and
all Presentations have exactly one corresponding layer. Having said that, I
fail to stringify even the simplest of objects (e.g. a layer object). 
I use the 
"qx.util.Json.stringify(layer)" 
command but all it does is to try and work out the JSON for a few seconds
and then spit out the "too many recursions" error (firebug). If I do the
exact same thing with the orinary JSON command:
JSON.stringify(layer)
I do get some output though it doesn't quite match my expectations -> 

{"$$initialized":true,"$$user_dbTableName":"Hi
there","$$user_id":1,"$$user_idMandator":13}

where I set the parameters "id", "idMandator" and "dbTableName".
Any suggestions are much welcome. I have attached the class definition
below. If there's any other code snippet that's needed, please let me know.

qx.Class.define("project.RasterLayer", 
{
  extend: qx.core.Object,
  construct : function() 
  { 
        
  },
   properties :
  {
  id:                           { nullable : true, event : "" },
  idMandator:   { nullable : true, event : "" },
  fileName:             { nullable : true, event : "" },
  bands:                        { nullable : true, event : "" }

  }
});

I noticed the discussion about bug 3883 but I only downloaded qooxdoo a
fortnight back and the bug was closed before then.

Cheers,

Norman
-- 
View this message in context: 
http://qooxdoo.678.n2.nabble.com/create-JSON-from-array-with-objects-encounters-too-many-recursions-error-tp5638678p5638678.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to