Return the Python representation of ``s`` (a ``str`` instance containing a JSON document).
(self, s, _w=WHITESPACE.match)
| 351 | |
| 352 | |
| 353 | def decode(self, s, _w=WHITESPACE.match): |
| 354 | """Return the Python representation of ``s`` (a ``str`` instance |
| 355 | containing a JSON document). |
| 356 | |
| 357 | """ |
| 358 | obj, end = self.raw_decode(s, idx=_w(s, 0).end()) |
| 359 | end = _w(s, end).end() |
| 360 | if end != len(s): |
| 361 | raise JSONDecodeError("Extra data", s, end) |
| 362 | return obj |
| 363 | |
| 364 | def raw_decode(self, s, idx=0): |
| 365 | """Decode a JSON document from ``s`` (a ``str`` beginning with |
no test coverage detected