Make portable objects saveable

I agree. I thought I would lump them together because they both need serialization/deserialization, even if they have different requirements at lower level.

It would be nice to have one decorator that takes care of both the tasks.
It would be nice to define the custom serialization only once.
It would be nice to be able to save objects with datetime values to a simple object column with just a decorator.

Today I was happy that adding the @anvil.server.portable_class decorator saved me the time to manage the serialization/deserialization of my classes, then, 30 minutes later when it was time to store to a simple object column, I was working on the serialization/deserialization anyway.

3 Likes