MCPcopy
hub / github.com/pyload/pyload / decode

Method decode

module/lib/simplejson/decoder.py:397–406  ·  view source on GitHub ↗

Return the Python representation of ``s`` (a ``str`` or ``unicode`` instance containing a JSON document)

(self, s, _w=WHITESPACE.match)

Source from the content-addressed store, hash-verified

395 self.scan_once = make_scanner(self)
396
397 def decode(self, s, _w=WHITESPACE.match):
398 """Return the Python representation of ``s`` (a ``str`` or ``unicode``
399 instance containing a JSON document)
400
401 """
402 obj, end = self.raw_decode(s, idx=_w(s, 0).end())
403 end = _w(s, end).end()
404 if end != len(s):
405 raise JSONDecodeError("Extra data", s, end, len(s))
406 return obj
407
408 def raw_decode(self, s, idx=0):
409 """Decode a JSON document from ``s`` (a ``str`` or ``unicode``

Callers 15

decodeFunction · 0.80
askMethod · 0.80
castMethod · 0.80
getMethod · 0.80
getPluginMethod · 0.80
readStringMethod · 0.80
decodeResponseMethod · 0.80
parseHeaderMethod · 0.80
popMethod · 0.80
processSingleStringMethod · 0.80
_open_resourceFunction · 0.80
_getCharacterEncodingFunction · 0.80

Calls 2

raw_decodeMethod · 0.95
JSONDecodeErrorClass · 0.85

Tested by

no test coverage detected