code: def _serialize(self, zenpy_object):
          
          # If it's a dict this object has already been serialized.
          if not type(zenpy_object) == dict:
              log.debug("Setting dirty object: {}".format(zenpy_object))
              self._dirty_object = zenpy_object
          return json.loads(json.dumps(zenpy_object, default=json_encode_for_zendesk))
docs: Serialize a Zenpy object to JSON