[XML-SIG] WDDX for Python

Simeon Simeonov simeons@allaire.com
Thu, 17 Dec 1998 17:44:20 -0500


Gabe,

>Also, I'm not sure what sort of Python objects or data types would map to
>a timeDate WDDX element.

To do WDDX serialization you really need to define a set of Python objects /
interfaces that other developers should use. Probably the best example code
to look at is the JavaScript serializer. Here is what I did:

- I created a WddxRecordset object because JS did not have the notion of a
recordset. Internally, I used it just as you deserialize recordsets--as an
object with property arrays. However, making it an object allowed me to
provide custom serialization semantics via a wddxSerialize(serializer)
method.

- All arrays and simple types I mapped to WDDX directly.

- All objects that did not define a custom serialization method I serialized
as structs. This allows for convenient serialization of any JS object.

Hope this provides some food for thought.

Regards,

Sim
Allaire