Guest User

Untitled

a guest
Mar 17th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. class Serializer():
  2. """
  3. Class to provide serialization/deserialization functionality.
  4. Mostly, other class will simple inherit this class to add
  5. serializability functionality
  6. """
  7.  
  8. def serialize(self):
  9. return jsonpickle.encode(self)
  10.  
  11. @staticmethod
  12. def deserialize(ser_str):
  13. return jsonpickle.decode(ser_str)
Add Comment
Please, Sign In to add comment