check out darron shall's object serializer, it should do the trick
On 28/12/2006, at 7:52 AM, chuvakgu wrote:
Hi all,
Here's what I am trying to do. I have an object that I
get from the server (currently via XmlRpc but that
doesn't really matter). It's an Object. I want to convert
it into a data structure on the client side for easier
manipulation. If I do something liek
class Foo {
var prop1:String;
...
}
then I could use code completion to refer to properties
of an instance of Foo. (I am lazy, and sometimes it's hard
to remember what properties are called). But on the downside,
in order to marshal/unmarshal this object into the raw
object, I need to know these properties. On the other hand
if I make Foo dynamic, and make the property names into constants,
I could use code completion in a bit more unwieldy way:
foo[Foo.prop1] = 'xxx'
and can also iterate through all these properties which is very
convenient for this marshaling/unmarshaling business.
Is there something that would let me combine the best of both
worlds?