MCPcopy Create free account
hub / github.com/9miao/CrossApp / decode

Method decode

tools/project-creator/Python2.6.6/Lib/json/decoder.py:313–323  ·  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

311 self.strict = strict
312
313 def decode(self, s, _w=WHITESPACE.match):
314 """
315 Return the Python representation of ``s`` (a ``str`` or ``unicode``
316 instance containing a JSON document)
317
318 """
319 obj, end = self.raw_decode(s, idx=_w(s, 0).end())
320 end = _w(s, end).end()
321 if end != len(s):
322 raise ValueError(errmsg("Extra data", s, end, len(s)))
323 return obj
324
325 def raw_decode(self, s, **kw):
326 """Decode a JSON document from ``s`` (a ``str`` or ``unicode`` beginning

Callers 5

loadsFunction · 0.45
_iterencode_dictMethod · 0.45
_iterencodeMethod · 0.45
encodeMethod · 0.45

Calls 4

raw_decodeMethod · 0.95
lenFunction · 0.85
errmsgFunction · 0.85
endMethod · 0.45

Tested by

no test coverage detected