Bug report
Bug description
The recently introduced array_hook parameter to json.load isn't being forwarded to json.loads, making it a no-op (it is always None).
This very simple reproducer shows it -- it fails with an Assertion Error.
fp = StringIO('[10, 20, 30]')
result = self.json.load(fp, array_hook=tuple)
assert isinstance(result, tuple)
CPython versions tested on
CPython main branch
Operating systems tested on
macOS
Linked PRs
Bug report
Bug description
The recently introduced
array_hookparameter tojson.loadisn't being forwarded tojson.loads, making it a no-op (it is alwaysNone).This very simple reproducer shows it -- it fails with an Assertion Error.
CPython versions tested on
CPython main branch
Operating systems tested on
macOS
Linked PRs
array_hooktojson.loads#149057