code: def default(self, obj):  # pylint: disable=method-hidden
          
  
          if hasattr(obj, 'strftime'):
              return obj.strftime("%Y-%m-%dT%H:%M:%SZ")
          elif hasattr(obj, 'get_public_dict'):
              return obj.get_public_dict()
          else:
              return json.JSONEncoder.default(self, obj)
docs: Use the default behavior unless the object to be encoded has a
          `strftime` attribute.