mikechambers/as3corelib — pull request #181 by mpj (2011-10-21 09:15:43+00:00)
Title: Serializer ignoring dynamically added properties

The serializer was not including properties that was added dynamically to classes.

The reason I really want this is that sometimes, the JSON you want to create does not quite correspond to the object you are serializing. In my case, the JSON object output needed a property called "in". "in" is a reserved keyword in ActionScript, so in my model, it was named "inPoint". This means that I need this, pre-serialization:

obj['in'] = obj.inPoint;

However, the serializer was not including properties that was added dynamically to classes. This was due to an unnecessarily strict if-clause, which I have now relaxed a bit.