Return the Python representation of ``s`` (a ``str`` instance containing a JSON document).
(self, s, _w=WHITESPACE.match)
| 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 |
no test coverage detected