diff --git a/MANIFEST.in b/MANIFEST.in index 70a696bc..b29c987e 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,12 +1 @@ -recursive-include deps * - -include README.rst -include MANIFEST.in -include LICENSE.txt -include setup.py -include tests/tests.py -include tests/sample.json -include lib/*.c -include lib/*.h -include python/*.c -include python/*.h +include python/version.h diff --git a/README.md b/README.md new file mode 100644 index 00000000..4e02b796 --- /dev/null +++ b/README.md @@ -0,0 +1,126 @@ +# UltraJSON + +[![PyPI version](https://img.shields.io/pypi/v/ujson.svg?logo=pypi&logoColor=FFE873)](https://pypi.org/project/ujson) +[![Supported Python versions](https://img.shields.io/pypi/pyversions/ujson.svg?logo=python&logoColor=FFE873)](https://pypi.org/project/ujson) +[![PyPI downloads](https://img.shields.io/pypi/dm/ujson.svg)](https://pypistats.org/packages/ujson) +[![GitHub Actions status](https://github.com/ultrajson/ultrajson/workflows/Test/badge.svg)](https://github.com/ultrajson/ultrajson/actions) +[![Travis CI status](https://travis-ci.com/ultrajson/ultrajson.svg?branch=main)](https://travis-ci.com/ultrajson/ultrajson) +[![codecov](https://codecov.io/gh/ultrajson/ultrajson/branch/main/graph/badge.svg)](https://codecov.io/gh/ultrajson/ultrajson) +[![DOI](https://zenodo.org/badge/1418941.svg)](https://zenodo.org/badge/latestdoi/1418941) +[![Code style: Black](https://img.shields.io/badge/code%20style-Black-000000.svg)](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: + +```sh +python -m pip install ujson +``` + +## Usage + +May be used as a drop in replacement for most other JSON parsers for Python: + +```pycon +>>> 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`: + +```pycon +>>> ujson.dumps("