TypeRegistry.serialize# TypeRegistry.serialize(obj)[source]# Serialize an object to a JSON-safe dict with __type__ key.