code: def default(self, obj):
          
          if isinstance(obj, UUID):
              return obj.hex
          elif isinstance(obj, datetime.datetime):
              return obj.isoformat()
  
          return super().default(obj)
docs: Encode more types.