ijsonA Python wrapper to YAJL providing standard iterator interface to streaming JSON parsing | |
Download |
ijson Ranking & Summary
Advertisement
- License:
- BSD License
- Publisher Name:
- Ivan Sagalaev
- Publisher web site:
- http://softwaremaniacs.org
ijson Tags
ijson Description
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. It provides a standard Python iterator interface for it.Usage:Basic usage:from ijson import parsef = urlopen('http://.../') # some huge JSONparser = 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)AcknowledgementsIjson 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. Requirements: · Python
ijson Related Software