JSON library unable to provide index during parse operations. #135354
Labels
extension-modules
C modules in the Modules dir
stdlib
Python modules in the Lib dir
type-feature
A feature request or enhancement
Uh oh!
There was an error while loading. Please reload this page.
Feature or enhancement
Proposal:
Currently hooks are provided to allow for some custom processing of json files. However, there is no way to obtain the index of the hooked operation. This would be especially useful for providing validation feedback on files, but there may be other benefits to providing this information to the hooks.
JSONDecoder
has araw_decode
method on it that can be overwritten, which could be passed the index, however currently this parameter is essentially unused, and the index is available only to the scanner implementation (which can either be pure python or the _json.c module.The proposal/feature is to add the index as a parameter to the hooks, or make it available as a part of
JSONDecoder
, possibly as new index-aware hooks so as to leave existing code interoperable.Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
The text was updated successfully, but these errors were encountered: