XML Serialisation in ActionScript 3

XML Serialisation – a nest of rubbishness no more.

In my experience, code to do this takes the form of massive source files devoted solely to mechanically copying properties out of one type of entity into another, which needed to be updated every time you tweaked the data model. blergh.

As such, I have written an ActionScript 3 helper library (h2j9k.XMLSerialiser) which dynamically serialises any in-memory object, and can de-serialise it back again into the same state from that XML (as long as all the important data is held in public fields or read-write properties, obviously). It preserves types, and includes child objects inline, and requires no configuration whatsoever.

I’m hosting the project at my site for open source code, so why not go take a look? It is MIT licensed so you can use it in your code at work…although it would be nice if you credited it back to h2j9k.org.



About tehwalrus

Lib Dem, Software Developer, General Geek. View all posts by tehwalrus

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: