Serializing form data - picke or XML?

rudyhot

New Member
I am trying to save form data, and I am wondering if I should use Python's native pickle, or some sort of XML serializer. I wanted to use django's serializers but these seem to be geared at working wit models, not regular Python dictionaries/objects.The object I want to serialize would be composed almost entirely of strings (and possibly integers) and would look something like this:\[code\]data = http://stackoverflow.com/questions/11369842/{'var1': "foo", 'var2': "bar", 'var3': ['bar', 'foo', 'moo', 'fish'], 'var4': 42}\[/code\]And I want to save this because I need to be able to render a HTML page based on these values at some point in the future.Should I go ahead with saving the pickled object - or should I save it as XML? I don't see any advantages of using XML, since I am not planning to access this outside of django. Am I making the wrong decision?Few notes:
  • This is not something I want to save in the session or cache, because I want to keep a history of these forms indefinitely
  • The format/layout of the forms is subject to change so making a db schema to hold this information would be impractical.
 
Back
Top