MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / decode

Method decode

tools/python-3.11.9-amd64/Lib/json/decoder.py:332–341  ·  view source on GitHub ↗

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

(self, s, _w=WHITESPACE.match)

Source from the content-addressed store, hash-verified

330
331
332 def decode(self, s, _w=WHITESPACE.match):
333 """Return the Python representation of ``s`` (a ``str`` instance
334 containing a JSON document).
335
336 """
337 obj, end = self.raw_decode(s, idx=_w(s, 0).end())
338 end = _w(s, end).end()
339 if end != len(s):
340 raise JSONDecodeError("Extra data", s, end)
341 return obj
342
343 def raw_decode(self, s, idx=0):
344 """Decode a JSON document from ``s`` (a ``str`` beginning with

Callers 1

loadsFunction · 0.45

Calls 3

raw_decodeMethod · 0.95
JSONDecodeErrorClass · 0.70
endMethod · 0.45

Tested by

no test coverage detected