obj.__class__ will return the actual Class object, we want to serialise a string (accessed with obj.__class__.__name__)