UltraJSON ========= .. image:: https://img.shields.io/pypi/v/ujson.svg :alt: PyPI version :target: https://pypi.python.org/pypi/ujson .. image:: https://img.shields.io/pypi/pyversions/ujson.svg :alt: Supported Python versions :target: https://pypi.python.org/pypi/ujson .. image:: https://img.shields.io/pypi/dm/ujson.svg :alt: PyPI downloads :target: https://pypistats.org/packages/ujson .. image:: https://github.com/ultrajson/ultrajson/workflows/Test/badge.svg :alt: GitHub Actions status :target: https://github.com/ultrajson/ultrajson/actions?query=workflow%3ATest .. image:: https://travis-ci.com/ultrajson/ultrajson.svg?branch=master :alt: Travis CI status :target: https://travis-ci.com/ultrajson/ultrajson .. image:: https://zenodo.org/badge/1418941.svg :alt: DOI :target: https://zenodo.org/badge/latestdoi/1418941 .. image:: https://img.shields.io/badge/code%20style-black-000000.svg :alt: Code style: Black :target: https://github.com/psf/black UltraJSON is an ultra fast JSON encoder and decoder written in pure C with bindings for Python 3.6+. Install with pip: .. code-block:: sh python -m pip install ujson ============ Usage ============ May be used as a drop in replacement for most other JSON parsers for Python: .. code-block:: python >>> import ujson >>> ujson.dumps([{"key": "value"}, 81, True]) '[{"key":"value"},81,true]' >>> ujson.loads("""[{"key": "value"}, 81, true]""") [{'key': 'value'}, 81, True] ~~~~~~~~~~~~~~~ Encoder options ~~~~~~~~~~~~~~~ encode_html_chars ----------------- Used to enable special encoding of "unsafe" HTML characters into safer Unicode sequences. Default is ``False``: .. code-block:: python >>> ujson.dumps("