>
> I'm quite sure that this must be around somewhere, but this time I didn't
> have any luck searching the archives...
>
> What I'm looking for is similar to a deep-copy/clone method (e.g.
> Arul/Tatsuo
> http://chattyfig.figleaf.com/mailman/htdig/flashcoders/2004-
> March/106149.htm
> l) but instead of getting a clone of the object in return, I'd like to get
> a
> String representation of the object.
>
> Example of the desired functionality:
>
>       o = {a:1, b:2, c:{c1:['a','b','c'], c2:true}};
>       var s:String = universalToString(o);
>       trace(s);
>
> Output:   {a:1, b:2, c:{c1:['a','b','c'], c2:true}}
>
> In my case the object will not contain any methods, just (deeply nested)
> 'vanilla' Objects, Arrays, Strings, Numbers and Booleans.
>
> Thanks for any pointers!
>

In the core2 library you have toSource() / clone() and copy() methods
Implemented for all the core objects, and more :)

http://www.buRRRn.com/projects/core2.html

seeing your notation you look for something working with AS2

core2 for AS2 is released Monday so not that much time to wait :)

zwetan





_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to