

def testEscapeCharacter(self):
    stream = StringIO('{"\\"ke\\"y\\\\"  : "va\\"l\\"ue"}   ')
    reader = pulljson.JSONPullParser(stream)
    event = reader.nextEvent()
    self.assertEqual(event.type, pulljson.START_OBJECT)
    event = reader.nextEvent()
    self.assertEqual(event.type, pulljson.FIELD_NAME)
    self.assertEqual(event.value, '"ke"y\\')
    event = reader.nextEvent()
    self.assertEqual(event.type, pulljson.FIELD_VALUE)
    self.assertEqual(reader.value, 'va"l"ue')
    event = reader.nextEvent()
    self.assertEqual(event.type, pulljson.END_OBJECT)
    event = reader.nextEvent()
    self.assertIsNone(event)

dataset/ETHPy150Open Teradata/PyTd/test/test_pulljson.py TestJSONPullParser.testEscapeCharacter/VarMisuse@104/148 `event`->`reader`