MCPcopy Create free account
hub / github.com/microsoft/debugpy / read_json

Method read_json

tests/debugpy/common/test_messaging.py:51–59  ·  view source on GitHub ↗
(self, decoder=None)

Source from the content-addressed store, hash-verified

49 return log.debug(format_string, self.name, dir, json.repr(data))
50
51 def read_json(self, decoder=None):
52 decoder = decoder if decoder is not None else self.json_decoder_factory()
53 try:
54 value = next(self.input)
55 except StopIteration:
56 raise messaging.NoMoreMessages(stream=self)
57 value = decoder.decode(json.dumps(value))
58 self._log_message("-->", value)
59 return value
60
61 def write_json(self, value, encoder=None):
62 encoder = encoder if encoder is not None else self.json_encoder_factory()

Callers 5

test_readMethod · 0.95
_invokeFunction · 0.45
mainFunction · 0.45
receiveMethod · 0.45
receiveFunction · 0.45

Calls 3

_log_messageMethod · 0.95
dumpsMethod · 0.80
decodeMethod · 0.45

Tested by

no test coverage detected