Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ __ https://raw.githubusercontent.com/python-rapidjson/python-rapidjson/master/LI
:target: https://readthedocs.org/projects/python-rapidjson/builds/
:alt: Documentation status

RapidJSON_ is an extremely fast C++ JSON parser and serialization library: this module
RapidJSON_ is an extremely fast C++ JSON and JSONC parser and serialization library: this module
wraps it into a Python 3 extension, exposing its serialization/deserialization (to/from
either ``bytes``, ``str`` or *file-like* instances) and `JSON Schema`__ validation
capabilities.
Expand Down Expand Up @@ -76,6 +76,22 @@ Basic usage looks like this:
Chunk: b'z"}'


JSONC Support
-----------
RapidJSON_ supports decoding JSONC_ using parsing flags.

.. code-block:: python

>>> import rapidjson
>>> rapidjson.Decoder(parse_mode=rapidjson.PM_COMMENTS | rapidjson.PM_TRAILING_COMMAS)('''\
{
"bar": /* Block comment */ "baz",
"foo":100, // Trailing comma and comment
}
''')
{'bar': 'baz', 'foo': 100}


Development
-----------

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
setup(
name='python-rapidjson',
version=VERSION,
description='Python wrapper around rapidjson',
description='Python bindings for the JSON/JSONC parser rapidjson',
long_description=LONG_DESCRIPTION + '\n\n' + CHANGES,
long_description_content_type='text/x-rst',
license='MIT License',
Expand Down
Loading