def assertObserverWritesJSON(self, recordSeparator: str='\x1e') -> None:
    '\n        Asserts that an observer created by L{jsonFileLogObserver} with the\n        given arguments writes events serialized as JSON text, using the given\n        record separator.\n\n        @param recordSeparator: C{recordSeparator} argument to\n            L{jsonFileLogObserver}\n        '
    with StringIO() as fileHandle:
        observer = jsonFileLogObserver(fileHandle, recordSeparator)
        event = dict(x=1)
        observer(event)
        self.assertEqual(fileHandle.getvalue(), f'''{recordSeparator}{{"x": 1}}
''')
Asserts that an observer created by L{jsonFileLogObserver} with the
given arguments writes events serialized as JSON text, using the given
record separator.

@param recordSeparator: C{recordSeparator} argument to
    L{jsonFileLogObserver}
def assertObserverWritesJSON(self, recordSeparator: str='\x1e') -> None:
    '\n        Asserts that an observer created by L{jsonFileLogObserver} with the\n        given arguments writes events serialized as JSON text, using the given\n        record separator.\n\n        @param recordSeparator: C{recordSeparator} argument to\n            L{jsonFileLogObserver}\n        '
    with StringIO() as fileHandle:
        observer = jsonFileLogObserver(fileHandle, recordSeparator)
        event = dict(x=1)
        observer(event)
        self.assertEqual(fileHandle.getvalue(), f'{recordSeparator}{{"x": 1}}
')