The py-yajl project aims to provide Python bindings to “Yajl” (Yet Another JSON Library) originally developed by Lloyd Hilaiel. “Yet another Python JSON module?” you might find yourself thinking, the advantages that Yajl brings to the table are:
- Speed
- Flexibility
Contents:
Using py-yajl is straight-forward and similar to using the json module introduced in Python 2.6.
Encoding:
import yajl
buffer = yajl.dumps({'foo' : 'bar'})
Decoding:
import yajl
obj = yajl.loads('{"foo":"bar"}')
You can find releases of py-yajl in the Python Package Index or you can get the source from GitHub via:
git clone git://github.com/rtyler/py-yajl.git