def write(self, string: str) -> None:
    try:
        _string = json.loads(string)
    except Exception:
        pass
    else:
        self._lines.append(_string)
def write(self, string: str) -> None:
    try:
        _string = json.loads(string)
    except Exception:
        pass
    else:
        self._lines.append(_string)