[XML-SIG] Simple WDDX Serialization

Paul Prescod paul@prescod.net
Tue, 22 Dec 1998 14:54:02 -0600


Gabe Wachob wrote:
> 
> OK, I have not been following the serialization thread very closely.
> 
> I want to put together a simple WDDX serializer, and I want to throw out
> my idea to see if anyone can see any major problems.

You should probably build on the work that Andrew Kuchling is doing in his
"universal serializer."

> String -> String
> 
> For the dateTime WDDX type, I am thinking either 1) do pattern matching on
> strings to determine if they are valid time/dates -- if so, make them
> dateTime WDDX elements, or 2) if a string begins with a magic code, then
> the rest of the string is interpreted as a dateTime element. 

Autosensing of either sort seems dangerous. Also, Python dates can be
encoded as integers and tuples. (see the time module for more information.
What we need is to ship some particular date/time class with the XML
package and require people to use it on both input and output.

> We could also
> have a flag in the serializer which turns on or off serialization into
> dateTime globally for the serialization of a particular object.

I'm not sure what you mean.

> I'm thinking that the serializer would only serialize a whole object at a
> time (ie it would not allow for "building" WDDX packets programmatically)

That sounds fine.

 Paul Prescod  - ISOGEN Consulting Engineer speaking for only himself
 http://itrc.uwaterloo.ca/~papresco

"Are the social and economic benefits of capital punishment sufficient
to outweigh the injustice of accidentally executing innocents?"
"What benefits???"