Ijson is a Python wrapper to YAJL which is a streaming SAX-like JSON parser. Ijson provides a standard Python iterator interface for it.
Usage
Basic usage:
from ijson import parse
f = urlopen('http://.../') # some huge JSON
parser = parse(f)
while True:
event, value = parser.next()
if event == 'start_map':
while event != 'end_map':
event, value = parser.next()
if event == 'map_key' and value == 'title':
event, value = parser.next()
do_something_with(value)
Acknowledgements
Ijson was inspired by yajl-py wrapper by Hatem Nassrat. Though ijson borrows almost nothing from the actual yajl-py code it was used as an example of integration with yajl using ctypes.
Metadata
Release files for ijson 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ijson-0.1.0.tar.gz | 3.1 kB | Details |
Release files / ijson-0.1.0.tar.gz
| Download URL | ijson-0.1.0.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ca36009f732a25a32ec805060bd8fb9f2d59023518005963108eafc6149080a8
|
|
BLAKE2b-256 checksum How to use checksums |
a2b94ba24ab9d601f1ab713a55998a3174c0965f92701438925018ec38b1a7d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |