Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

A Python wrapper to YAJL providing standard iterator interface to streaming JSON parsing

Project description

Ijson is a Python wrapper to YAJL which is a streaming SAX-like JSON parser. Ijson provides a standard Python iterator interface for it.


Common usage:

from ijson import parse

f = urlopen('http://.../') # some huge JSON
parser = parse(f)
while True:
    prefix, event, value =
    if prefix == 'earth.europe' and event == 'start_array':
        while prefix.startswith('earth.europe'):
            prefix, event, value =
            if event == 'map_key':
                key = value
                prefix, event, value =
                do_something_with(key, 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.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ijson, version 0.4.0
Filename, size File type Python version Upload date Hashes
Filename, size ijson-0.4.0.tar.gz (4.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page