A hyper-fast and safe Python module to read and write JSON data
hyperjson
A hyper-fast, safe Python module to read and write JSON data. Works as a drop-in replacement for Python’s built-in json module. This is alpha software and there will be bugs, so maybe don’t deploy to production just yet.
Installation
pip install hyperjson
Usage
hyperjson is meant as a drop-in replacement for Python’s json
module:
>>> import hyperjson
>>> hyperjson.dumps([{"key": "value"}, 81, True])
'[{"key":"value"},81,true]'
>>> hyperjson.loads("""[{"key": "value"}, 81, true]""")
[{u'key': u'value'}, 81, True]
Motivation
Parsing JSON is a solved problem; so, no need to reinvent the wheel, right?
Well, unless you care about performance and safety.
Turns out, parsing JSON correctly is a hard problem. Thanks to Rust however, we can minimize the risk of running into stack overflows