def METHOD_NAME(self):
    """Returns the data that have to be serialized by JSON"""
    attrNames = [
        "FileID",
        "OperationID",
        "Status",
        "LFN",
        "PFN",
        "ChecksumType",
        "Checksum",
        "GUID",
        "Attempt",
        "Size",
        "Error",
    ]
    jsonData = {}
    for attrName in attrNames:
        # FileID and OperationID might not be set since they are managed by SQLAlchemy
        if not hasattr(self, attrName):
            continue
        jsonData[attrName] = getattr(self, attrName)
        value = getattr(self, attrName)
        if isinstance(value, datetime.datetime):
            # We convert date time to a string
            jsonData[attrName] = value.strftime(self._datetimeFormat)  # pylint: disable=no-member
        else:
            jsonData[attrName] = value
    return jsonData