Hooray for 10 hour yahoo groups posting lag!  =]

--- In [email protected], "booleanbetrayal"
<[EMAIL PROTECTED]> wrote:
>
> I submitted some code to the project that does this sort of recursive
> translation. I never experienced any describeType() lag, but I never
> really extensively profiled it, either. Hope this helps. You can find
> it here:
> 
> http://code.google.com/p/as3corelib/issues/detail?id=22
> 
> - Brent
> 
> 
> 
> --- In [email protected], "Richard Rodseth" <rrodseth@> wrote:
> >
> > Has anyone done the work to enhance Darron Schall's ObjectTranslator
> > class to work recursively, as he describes in the source code?
> > 
> > In the absence of that, I was think of adding static factory methods
> > to my VO objects, as follows:
> > 
> > static public function newInstanceFromJSON(json : String) :
StudentVO {
> >     var student:Object = JSON.decode( json );                       var
> > studentVO:StudentVO =
> > ObjectTranslator.objectToInstanc(student,StudentVO);
> > 
> >     for ( var i:int = 0; i < studentVO.books.length; i++ )
> >     {
> >             var bookVO:BookVO = ObjectTranslator.objectToInstance(
> > studentVO.books[i], BookVO ) as BookVO;
> >             // Use the converted class instance in place of the regular 
> > object
> >             studentVO.books[i] = bookVO;
> >     }
> >     return studentVO;                                               
> > }
> > 
> > Comments welcome.
> >
>


Reply via email to