FlexXB is a serializer for Flex and Air applications, using annotations in order to automate the (de)serialization process. It has built-in support for (de)serializing xml. In order for FlexXB to be able to automate the (de)serialization process, the model objects involved must be “decorated” with AS3 metadata tags that will instruct it on how they should be processed.
The tool is serialization format agnostic and allows users to extend the engine and add support for different serialization formats (JSON, etc) while still sharing the base features such as object caching, circular reference handling, constructor annotations, id fields, version extraction.
Sample
// Class [XmlClass(alias="MOck2Replacement", idField="id")] public class Mock3 { [XmlAttribute] public var id : Number = 3; [XmlAttribute] public var attribute : Boolean; [XmlElement(alias="objectVersion")] public var version : Number; public function Mock3() { super(); } } // The object has been built as: var target : Mock3 = new Mock3(); target.attribute = true; target.id = 5; target.version = 33; // The resulting XML is: 33