Skip to content

Instantly share code, notes, and snippets.

@droot
Created January 9, 2010 05:12
Show Gist options
  • Save droot/272736 to your computer and use it in GitHub Desktop.
Save droot/272736 to your computer and use it in GitHub Desktop.
class Serializer():
"""
Class to provide serialization/deserialization functionality.
Mostly, other class will simple inherit this class to add
serializability functionality
"""
def serialize(self):
return jsonpickle.encode(self)
@staticmethod
def deserialize(ser_str):
return jsonpickle.decode(ser_str)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment