A Python wrapper to YAJL providing standard iterator interface to streaming JSON parsing
Ijson is a Python wrapper to YAJL which is a streaming SAX-like JSON parser. Ijson provides a standard Python iterator interface for it.
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)
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.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size ijson-0.1.0.tar.gz (3.1 kB)||File type Source||Python version None||Upload date||Hashes View|