Closed nlevitt closed 8 years ago
Took me a while to get to it, sorry!
The point of ijson was to go away from the callback-based API towards a more natural looking iterator, so the approach you're describing is not for ijson. I laid out my thoughts and current state of affairs in a similar ticket #45 (closing this one as a dupe, then).
Would like to have an api that can be used for example with asyncio. https://github.com/kashifrazzaqui/json-streamer can be used that way (but it doesn't "yield native Python objects out of a JSON stream located under a prefix"). Here's what one approach would look like: