python-rapidjson 1.21__tar.gz → 1.23__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_rapidjson-1.21 → python_rapidjson-1.23}/CHANGES.rst +17 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/PKG-INFO +41 -3
- {python_rapidjson-1.21 → python_rapidjson-1.23}/README.rst +21 -1
- {python_rapidjson-1.21 → python_rapidjson-1.23}/docs/changes.rst +17 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/docs/quickstart.rst +20 -1
- {python_rapidjson-1.21 → python_rapidjson-1.23}/python_rapidjson.egg-info/PKG-INFO +41 -3
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson.cpp +12 -18
- {python_rapidjson-1.21 → python_rapidjson-1.23}/setup.py +3 -2
- {python_rapidjson-1.21 → python_rapidjson-1.23}/tests/test_memory_leaks.py +7 -4
- {python_rapidjson-1.21 → python_rapidjson-1.23}/tests/test_params.py +12 -1
- {python_rapidjson-1.21 → python_rapidjson-1.23}/tests/test_refs_count.py +5 -4
- {python_rapidjson-1.21 → python_rapidjson-1.23}/.dir-locals.el +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/LICENSE +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/MANIFEST.in +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/benchmarks/conftest.py +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/benchmarks/tablize.py +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/benchmarks/test_benchmark.py +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/docs/Makefile +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/docs/api.rst +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/docs/benchmarks-tables.rst +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/docs/benchmarks.rst +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/docs/conf.py +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/docs/decoder.rst +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/docs/dump.rst +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/docs/dumps.rst +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/docs/encoder.rst +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/docs/index.rst +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/docs/load.rst +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/docs/loads.rst +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/docs/rawjson.rst +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/docs/validator.rst +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/python_rapidjson.egg-info/SOURCES.txt +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/python_rapidjson.egg-info/dependency_links.txt +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/python_rapidjson.egg-info/top_level.txt +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/allocators.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/cursorstreamwrapper.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/document.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/encodedstream.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/encodings.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/error/en.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/error/error.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/filereadstream.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/filewritestream.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/fwd.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/internal/biginteger.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/internal/clzll.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/internal/diyfp.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/internal/dtoa.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/internal/ieee754.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/internal/itoa.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/internal/meta.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/internal/pow10.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/internal/regex.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/internal/stack.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/internal/strfunc.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/internal/strtod.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/internal/swap.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/istreamwrapper.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/memorybuffer.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/memorystream.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/msinttypes/inttypes.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/msinttypes/stdint.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/ostreamwrapper.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/pointer.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/prettywriter.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/rapidjson.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/reader.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/schema.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/stream.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/stringbuffer.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/uri.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/writer.h +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/license.txt +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/readme.md +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson_exact_version.txt +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/requirements-test.txt +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/requirements.txt +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/setup.cfg +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/tests/conftest.py +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/tests/test_base_types.py +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/tests/test_circular.py +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/tests/test_dict_subclass.py +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/tests/test_enum.py +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/tests/test_float.py +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/tests/test_pass1.py +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/tests/test_pass2.py +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/tests/test_pass3.py +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/tests/test_rawjson.py +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/tests/test_streams.py +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/tests/test_unicode.py +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/tests/test_validator.py +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/tox.ini +0 -0
- {python_rapidjson-1.21 → python_rapidjson-1.23}/typings/rapidjson/__init__.pyi +0 -0
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
Changes
|
|
2
2
|
-------
|
|
3
3
|
|
|
4
|
+
1.23 (2025-12-07)
|
|
5
|
+
~~~~~~~~~~~~~~~~~
|
|
6
|
+
|
|
7
|
+
* Fix serialization bug when using ``MM_COERCE_KEYS_TO_STRINGS`` together with
|
|
8
|
+
``sort_keys=True`` (`issue #229`__)
|
|
9
|
+
|
|
10
|
+
__ https://github.com/python-rapidjson/python-rapidjson/issues/229
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
1.22 (2025-10-21)
|
|
14
|
+
~~~~~~~~~~~~~~~~~
|
|
15
|
+
|
|
16
|
+
* Generate wheels on PyPI using Python 3.14 final release, thanks to cibuildwheel `3.2.1`__
|
|
17
|
+
|
|
18
|
+
__ https://cibuildwheel.pypa.io/en/stable/changelog/#v321
|
|
19
|
+
|
|
20
|
+
|
|
4
21
|
1.21 (2025-07-10)
|
|
5
22
|
~~~~~~~~~~~~~~~~~
|
|
6
23
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-rapidjson
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.23
|
|
4
4
|
Summary: Python wrapper around rapidjson
|
|
5
5
|
Home-page: https://github.com/python-rapidjson/python-rapidjson
|
|
6
6
|
Author: Ken Robbins
|
|
@@ -8,7 +8,7 @@ Author-email: ken@kenrobbins.com
|
|
|
8
8
|
Maintainer: Lele Gaifax
|
|
9
9
|
Maintainer-email: lele@metapensiero.it
|
|
10
10
|
License: MIT License
|
|
11
|
-
Keywords: json rapidjson
|
|
11
|
+
Keywords: json jsonc rapidjson
|
|
12
12
|
Classifier: Development Status :: 5 - Production/Stable
|
|
13
13
|
Classifier: Intended Audience :: Developers
|
|
14
14
|
Classifier: Programming Language :: C++
|
|
@@ -19,6 +19,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.12
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
22
23
|
Classifier: Programming Language :: Python
|
|
23
24
|
Requires-Python: >=3.6
|
|
24
25
|
Description-Content-Type: text/x-rst
|
|
@@ -42,7 +43,7 @@ Dynamic: summary
|
|
|
42
43
|
.. :Author: Ken Robbins <ken@kenrobbins.com>
|
|
43
44
|
.. :License: MIT License
|
|
44
45
|
.. :Copyright: © 2015 Ken Robbins
|
|
45
|
-
.. :Copyright: © 2016, 2017, 2018, 2020, 2022, 2024 Lele Gaifax
|
|
46
|
+
.. :Copyright: © 2016, 2017, 2018, 2020, 2022, 2024, 2025 Lele Gaifax
|
|
46
47
|
..
|
|
47
48
|
|
|
48
49
|
==================
|
|
@@ -114,6 +115,26 @@ Basic usage looks like this:
|
|
|
114
115
|
Chunk: b'":"ba'
|
|
115
116
|
Chunk: b'z"}'
|
|
116
117
|
|
|
118
|
+
Most functionalities are exposed both as *functions* and as *classes*.
|
|
119
|
+
|
|
120
|
+
The following uses a *relaxed syntax* ``Decoder`` instance, that handles JSONC__ and
|
|
121
|
+
*trailing commas*:
|
|
122
|
+
|
|
123
|
+
__ https://jsonc.org/
|
|
124
|
+
|
|
125
|
+
.. code-block:: python
|
|
126
|
+
|
|
127
|
+
>>> from rapidjson import Decoder
|
|
128
|
+
>>> from rapidjson import PM_COMMENTS, PM_TRAILING_COMMAS
|
|
129
|
+
>>> decoder = Decoder(parse_mode=PM_COMMENTS | PM_TRAILING_COMMAS)
|
|
130
|
+
>>> decoder('''
|
|
131
|
+
... {
|
|
132
|
+
... "bar": /* Block comment */ "baz",
|
|
133
|
+
... "foo":100, // Trailing comma and comment
|
|
134
|
+
... }
|
|
135
|
+
... ''')
|
|
136
|
+
{'bar': 'baz', 'foo': 100}
|
|
137
|
+
|
|
117
138
|
|
|
118
139
|
Development
|
|
119
140
|
-----------
|
|
@@ -167,6 +188,23 @@ __ https://python-rapidjson.readthedocs.io/en/latest/quickstart.html#incompatibi
|
|
|
167
188
|
Changes
|
|
168
189
|
-------
|
|
169
190
|
|
|
191
|
+
1.23 (2025-12-07)
|
|
192
|
+
~~~~~~~~~~~~~~~~~
|
|
193
|
+
|
|
194
|
+
* Fix serialization bug when using ``MM_COERCE_KEYS_TO_STRINGS`` together with
|
|
195
|
+
``sort_keys=True`` (`issue #229`__)
|
|
196
|
+
|
|
197
|
+
__ https://github.com/python-rapidjson/python-rapidjson/issues/229
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
1.22 (2025-10-21)
|
|
201
|
+
~~~~~~~~~~~~~~~~~
|
|
202
|
+
|
|
203
|
+
* Generate wheels on PyPI using Python 3.14 final release, thanks to cibuildwheel `3.2.1`__
|
|
204
|
+
|
|
205
|
+
__ https://cibuildwheel.pypa.io/en/stable/changelog/#v321
|
|
206
|
+
|
|
207
|
+
|
|
170
208
|
1.21 (2025-07-10)
|
|
171
209
|
~~~~~~~~~~~~~~~~~
|
|
172
210
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
.. :Author: Ken Robbins <ken@kenrobbins.com>
|
|
4
4
|
.. :License: MIT License
|
|
5
5
|
.. :Copyright: © 2015 Ken Robbins
|
|
6
|
-
.. :Copyright: © 2016, 2017, 2018, 2020, 2022, 2024 Lele Gaifax
|
|
6
|
+
.. :Copyright: © 2016, 2017, 2018, 2020, 2022, 2024, 2025 Lele Gaifax
|
|
7
7
|
..
|
|
8
8
|
|
|
9
9
|
==================
|
|
@@ -75,6 +75,26 @@ Basic usage looks like this:
|
|
|
75
75
|
Chunk: b'":"ba'
|
|
76
76
|
Chunk: b'z"}'
|
|
77
77
|
|
|
78
|
+
Most functionalities are exposed both as *functions* and as *classes*.
|
|
79
|
+
|
|
80
|
+
The following uses a *relaxed syntax* ``Decoder`` instance, that handles JSONC__ and
|
|
81
|
+
*trailing commas*:
|
|
82
|
+
|
|
83
|
+
__ https://jsonc.org/
|
|
84
|
+
|
|
85
|
+
.. code-block:: python
|
|
86
|
+
|
|
87
|
+
>>> from rapidjson import Decoder
|
|
88
|
+
>>> from rapidjson import PM_COMMENTS, PM_TRAILING_COMMAS
|
|
89
|
+
>>> decoder = Decoder(parse_mode=PM_COMMENTS | PM_TRAILING_COMMAS)
|
|
90
|
+
>>> decoder('''
|
|
91
|
+
... {
|
|
92
|
+
... "bar": /* Block comment */ "baz",
|
|
93
|
+
... "foo":100, // Trailing comma and comment
|
|
94
|
+
... }
|
|
95
|
+
... ''')
|
|
96
|
+
{'bar': 'baz', 'foo': 100}
|
|
97
|
+
|
|
78
98
|
|
|
79
99
|
Development
|
|
80
100
|
-----------
|
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
Changes
|
|
2
2
|
-------
|
|
3
3
|
|
|
4
|
+
1.23 (2025-12-07)
|
|
5
|
+
~~~~~~~~~~~~~~~~~
|
|
6
|
+
|
|
7
|
+
* Fix serialization bug when using ``MM_COERCE_KEYS_TO_STRINGS`` together with
|
|
8
|
+
``sort_keys=True`` (`issue #229`__)
|
|
9
|
+
|
|
10
|
+
__ https://github.com/python-rapidjson/python-rapidjson/issues/229
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
1.22 (2025-10-21)
|
|
14
|
+
~~~~~~~~~~~~~~~~~
|
|
15
|
+
|
|
16
|
+
* Generate wheels on PyPI using Python 3.14 final release, thanks to cibuildwheel `3.2.1`__
|
|
17
|
+
|
|
18
|
+
__ https://cibuildwheel.pypa.io/en/stable/changelog/#v321
|
|
19
|
+
|
|
20
|
+
|
|
4
21
|
1.21 (2025-07-10)
|
|
5
22
|
~~~~~~~~~~~~~~~~~
|
|
6
23
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
.. :Project: python-rapidjson -- Quickstart examples
|
|
3
3
|
.. :Author: Lele Gaifax <lele@metapensiero.it>
|
|
4
4
|
.. :License: MIT License
|
|
5
|
-
.. :Copyright: © 2016, 2017, 2018, 2020, 2021 Lele Gaifax
|
|
5
|
+
.. :Copyright: © 2016, 2017, 2018, 2020, 2021, 2025 Lele Gaifax
|
|
6
6
|
..
|
|
7
7
|
|
|
8
8
|
=============
|
|
@@ -158,6 +158,25 @@ The module exposes also a *stream* interface:
|
|
|
158
158
|
>>> load(stream) == data
|
|
159
159
|
True
|
|
160
160
|
|
|
161
|
+
Almost all these functionalities are also available as *classes*. For example, the
|
|
162
|
+
following uses a *relaxed syntax* :class:`~rapidjson.Decoder` instance, that handles
|
|
163
|
+
JSONC__ and *trailing commas*:
|
|
164
|
+
|
|
165
|
+
__ https://jsonc.org/
|
|
166
|
+
|
|
167
|
+
.. code-block:: python
|
|
168
|
+
|
|
169
|
+
>>> from rapidjson import Decoder
|
|
170
|
+
>>> from rapidjson import PM_COMMENTS, PM_TRAILING_COMMAS
|
|
171
|
+
>>> decoder = Decoder(parse_mode=PM_COMMENTS | PM_TRAILING_COMMAS)
|
|
172
|
+
>>> decoder('''
|
|
173
|
+
... {
|
|
174
|
+
... "bar": /* Block comment */ "baz",
|
|
175
|
+
... "foo":100, // Trailing comma and comment
|
|
176
|
+
... }
|
|
177
|
+
... ''')
|
|
178
|
+
{'bar': 'baz', 'foo': 100}
|
|
179
|
+
|
|
161
180
|
|
|
162
181
|
Incompatibilities
|
|
163
182
|
-----------------
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-rapidjson
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.23
|
|
4
4
|
Summary: Python wrapper around rapidjson
|
|
5
5
|
Home-page: https://github.com/python-rapidjson/python-rapidjson
|
|
6
6
|
Author: Ken Robbins
|
|
@@ -8,7 +8,7 @@ Author-email: ken@kenrobbins.com
|
|
|
8
8
|
Maintainer: Lele Gaifax
|
|
9
9
|
Maintainer-email: lele@metapensiero.it
|
|
10
10
|
License: MIT License
|
|
11
|
-
Keywords: json rapidjson
|
|
11
|
+
Keywords: json jsonc rapidjson
|
|
12
12
|
Classifier: Development Status :: 5 - Production/Stable
|
|
13
13
|
Classifier: Intended Audience :: Developers
|
|
14
14
|
Classifier: Programming Language :: C++
|
|
@@ -19,6 +19,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.12
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
22
23
|
Classifier: Programming Language :: Python
|
|
23
24
|
Requires-Python: >=3.6
|
|
24
25
|
Description-Content-Type: text/x-rst
|
|
@@ -42,7 +43,7 @@ Dynamic: summary
|
|
|
42
43
|
.. :Author: Ken Robbins <ken@kenrobbins.com>
|
|
43
44
|
.. :License: MIT License
|
|
44
45
|
.. :Copyright: © 2015 Ken Robbins
|
|
45
|
-
.. :Copyright: © 2016, 2017, 2018, 2020, 2022, 2024 Lele Gaifax
|
|
46
|
+
.. :Copyright: © 2016, 2017, 2018, 2020, 2022, 2024, 2025 Lele Gaifax
|
|
46
47
|
..
|
|
47
48
|
|
|
48
49
|
==================
|
|
@@ -114,6 +115,26 @@ Basic usage looks like this:
|
|
|
114
115
|
Chunk: b'":"ba'
|
|
115
116
|
Chunk: b'z"}'
|
|
116
117
|
|
|
118
|
+
Most functionalities are exposed both as *functions* and as *classes*.
|
|
119
|
+
|
|
120
|
+
The following uses a *relaxed syntax* ``Decoder`` instance, that handles JSONC__ and
|
|
121
|
+
*trailing commas*:
|
|
122
|
+
|
|
123
|
+
__ https://jsonc.org/
|
|
124
|
+
|
|
125
|
+
.. code-block:: python
|
|
126
|
+
|
|
127
|
+
>>> from rapidjson import Decoder
|
|
128
|
+
>>> from rapidjson import PM_COMMENTS, PM_TRAILING_COMMAS
|
|
129
|
+
>>> decoder = Decoder(parse_mode=PM_COMMENTS | PM_TRAILING_COMMAS)
|
|
130
|
+
>>> decoder('''
|
|
131
|
+
... {
|
|
132
|
+
... "bar": /* Block comment */ "baz",
|
|
133
|
+
... "foo":100, // Trailing comma and comment
|
|
134
|
+
... }
|
|
135
|
+
... ''')
|
|
136
|
+
{'bar': 'baz', 'foo': 100}
|
|
137
|
+
|
|
117
138
|
|
|
118
139
|
Development
|
|
119
140
|
-----------
|
|
@@ -167,6 +188,23 @@ __ https://python-rapidjson.readthedocs.io/en/latest/quickstart.html#incompatibi
|
|
|
167
188
|
Changes
|
|
168
189
|
-------
|
|
169
190
|
|
|
191
|
+
1.23 (2025-12-07)
|
|
192
|
+
~~~~~~~~~~~~~~~~~
|
|
193
|
+
|
|
194
|
+
* Fix serialization bug when using ``MM_COERCE_KEYS_TO_STRINGS`` together with
|
|
195
|
+
``sort_keys=True`` (`issue #229`__)
|
|
196
|
+
|
|
197
|
+
__ https://github.com/python-rapidjson/python-rapidjson/issues/229
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
1.22 (2025-10-21)
|
|
201
|
+
~~~~~~~~~~~~~~~~~
|
|
202
|
+
|
|
203
|
+
* Generate wheels on PyPI using Python 3.14 final release, thanks to cibuildwheel `3.2.1`__
|
|
204
|
+
|
|
205
|
+
__ https://cibuildwheel.pypa.io/en/stable/changelog/#v321
|
|
206
|
+
|
|
207
|
+
|
|
170
208
|
1.21 (2025-07-10)
|
|
171
209
|
~~~~~~~~~~~~~~~~~
|
|
172
210
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// :Author: Ken Robbins <ken@kenrobbins.com>
|
|
4
4
|
// :License: MIT License
|
|
5
5
|
// :Copyright: © 2015 Ken Robbins
|
|
6
|
-
// :Copyright: © 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024 Lele Gaifax
|
|
6
|
+
// :Copyright: © 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025 Lele Gaifax
|
|
7
7
|
//
|
|
8
8
|
|
|
9
9
|
#include <locale.h>
|
|
@@ -2297,23 +2297,17 @@ decoder_new(PyTypeObject* type, PyObject* args, PyObject* kwargs)
|
|
|
2297
2297
|
|
|
2298
2298
|
|
|
2299
2299
|
struct DictItem {
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
: key_str(k),
|
|
2308
|
-
key_size(s),
|
|
2309
|
-
item(i)
|
|
2300
|
+
std::string key;
|
|
2301
|
+
PyObject* value;
|
|
2302
|
+
|
|
2303
|
+
DictItem(std::string k,
|
|
2304
|
+
PyObject* v)
|
|
2305
|
+
: key(k),
|
|
2306
|
+
value(v)
|
|
2310
2307
|
{}
|
|
2311
2308
|
|
|
2312
2309
|
bool operator<(const DictItem& other) const {
|
|
2313
|
-
|
|
2314
|
-
Py_ssize_t oks = other.key_size;
|
|
2315
|
-
int cmp = strncmp(this->key_str, other.key_str, tks < oks ? tks : oks);
|
|
2316
|
-
return (cmp == 0) ? (tks < oks) : (cmp < 0);
|
|
2310
|
+
return key < other.key;
|
|
2317
2311
|
}
|
|
2318
2312
|
};
|
|
2319
2313
|
|
|
@@ -2613,7 +2607,7 @@ dumps_internal(
|
|
|
2613
2607
|
return false;
|
|
2614
2608
|
}
|
|
2615
2609
|
ASSERT_VALID_SIZE(l);
|
|
2616
|
-
items.push_back(DictItem(key_str, l, item));
|
|
2610
|
+
items.push_back(DictItem(std::string(key_str, l), item));
|
|
2617
2611
|
} else if (!(mappingMode & MM_SKIP_NON_STRING_KEYS)) {
|
|
2618
2612
|
PyErr_SetString(PyExc_TypeError, "keys must be strings");
|
|
2619
2613
|
assert(!coercedKey);
|
|
@@ -2625,10 +2619,10 @@ dumps_internal(
|
|
|
2625
2619
|
std::sort(items.begin(), items.end());
|
|
2626
2620
|
|
|
2627
2621
|
for (size_t i=0, s=items.size(); i < s; i++) {
|
|
2628
|
-
writer->Key(items[i].
|
|
2622
|
+
writer->Key(items[i].key.c_str(), (SizeType) items[i].key.length());
|
|
2629
2623
|
if (Py_EnterRecursiveCall(" while JSONifying dict object"))
|
|
2630
2624
|
return false;
|
|
2631
|
-
bool r = RECURSE(items[i].
|
|
2625
|
+
bool r = RECURSE(items[i].value);
|
|
2632
2626
|
Py_LeaveRecursiveCall();
|
|
2633
2627
|
if (!r)
|
|
2634
2628
|
return false;
|
|
@@ -44,7 +44,7 @@ else:
|
|
|
44
44
|
" want to report the issue.")
|
|
45
45
|
|
|
46
46
|
# Automatically updated by bump-my-version at release time
|
|
47
|
-
VERSION = '1.
|
|
47
|
+
VERSION = '1.23'
|
|
48
48
|
|
|
49
49
|
with open('README.rst', encoding='utf-8') as f:
|
|
50
50
|
LONG_DESCRIPTION = f.read()
|
|
@@ -94,7 +94,7 @@ setup(
|
|
|
94
94
|
long_description=LONG_DESCRIPTION + '\n\n' + CHANGES,
|
|
95
95
|
long_description_content_type='text/x-rst',
|
|
96
96
|
license='MIT License',
|
|
97
|
-
keywords='json rapidjson',
|
|
97
|
+
keywords='json jsonc rapidjson',
|
|
98
98
|
author='Ken Robbins',
|
|
99
99
|
author_email='ken@kenrobbins.com',
|
|
100
100
|
maintainer='Lele Gaifax',
|
|
@@ -111,6 +111,7 @@ setup(
|
|
|
111
111
|
'Programming Language :: Python :: 3.11',
|
|
112
112
|
'Programming Language :: Python :: 3.12',
|
|
113
113
|
'Programming Language :: Python :: 3.13',
|
|
114
|
+
'Programming Language :: Python :: 3.14',
|
|
114
115
|
'Programming Language :: Python',
|
|
115
116
|
],
|
|
116
117
|
ext_modules=[Extension('rapidjson', **extension_options)],
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# :Created: dom 10 feb 2019 13:47:32 CET
|
|
4
4
|
# :Author: Lele Gaifax <lele@metapensiero.it>
|
|
5
5
|
# :License: MIT License
|
|
6
|
-
# :Copyright: © 2019 Lele Gaifax
|
|
6
|
+
# :Copyright: © 2019, 2025 Lele Gaifax
|
|
7
7
|
#
|
|
8
8
|
|
|
9
9
|
import io
|
|
@@ -53,7 +53,8 @@ def test_object_hook_and_default():
|
|
|
53
53
|
tracemalloc.stop()
|
|
54
54
|
|
|
55
55
|
for stat in top_stats[:10]:
|
|
56
|
-
|
|
56
|
+
# Uhm, with Py 3.14, on macOS, the diff is 3...
|
|
57
|
+
assert stat.count_diff <= 3
|
|
57
58
|
|
|
58
59
|
|
|
59
60
|
def test_load():
|
|
@@ -78,7 +79,8 @@ def test_load():
|
|
|
78
79
|
tracemalloc.stop()
|
|
79
80
|
|
|
80
81
|
for stat in top_stats[:10]:
|
|
81
|
-
|
|
82
|
+
# Uhm, with Py 3.14, on macOS, the diff is 3...
|
|
83
|
+
assert stat.count_diff <= 3
|
|
82
84
|
|
|
83
85
|
|
|
84
86
|
def test_failed_validation():
|
|
@@ -121,4 +123,5 @@ def test_failed_validation():
|
|
|
121
123
|
tracemalloc.stop()
|
|
122
124
|
|
|
123
125
|
for stat in top_stats[:10]:
|
|
124
|
-
|
|
126
|
+
# Uhm, with Py 3.14, on macOS, the diff is 3...
|
|
127
|
+
assert stat.count_diff <= 3
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# :Author: Ken Robbins <ken@kenrobbins.com>
|
|
4
4
|
# :License: MIT License
|
|
5
5
|
# :Copyright: © 2015 Ken Robbins
|
|
6
|
-
# :Copyright: © 2015, 2016, 2017, 2018, 2019, 2020 Lele Gaifax
|
|
6
|
+
# :Copyright: © 2015, 2016, 2017, 2018, 2019, 2020, 2025 Lele Gaifax
|
|
7
7
|
#
|
|
8
8
|
|
|
9
9
|
from calendar import timegm
|
|
@@ -217,6 +217,17 @@ def test_sort_keys(dumps):
|
|
|
217
217
|
assert dumps(o, sort_keys=True) == '{"a":"a","a\\u0000b":"a\\u0000b","a0":"a0","a1":"a1"}'
|
|
218
218
|
|
|
219
219
|
|
|
220
|
+
def test_sort_and_coerce_keys(dumps):
|
|
221
|
+
# Issue 229
|
|
222
|
+
o = {"a": 1, 3: 4.5, date(2025,10,10): 2, date(2025,11,11): 3}
|
|
223
|
+
expected = '{"2025-10-10":2,"2025-11-11":3,"3":4.5,"a":1}'
|
|
224
|
+
assert dumps(o, sort_keys=True, mapping_mode=rj.MM_COERCE_KEYS_TO_STRINGS) == expected
|
|
225
|
+
|
|
226
|
+
o = {"ab": 3, "a": 1, "a\x00b": 2}
|
|
227
|
+
expected = '{"a":1,"a\\u0000b":2,"ab":3}'
|
|
228
|
+
assert dumps(o, sort_keys=True, mapping_mode=rj.MM_COERCE_KEYS_TO_STRINGS) == expected
|
|
229
|
+
|
|
230
|
+
|
|
220
231
|
def test_default():
|
|
221
232
|
class Bar:
|
|
222
233
|
pass
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# :Project: python-rapidjson -- Refs leaks tests
|
|
3
3
|
# :Author: Lele Gaifax <lele@metapensiero.it>
|
|
4
4
|
# :License: MIT License
|
|
5
|
-
# :Copyright: © 2017, 2018, 2020, 2022 Lele Gaifax
|
|
5
|
+
# :Copyright: © 2017, 2018, 2020, 2022, 2025 Lele Gaifax
|
|
6
6
|
#
|
|
7
7
|
|
|
8
8
|
# NB: this is a simplistic test that uses sys.gettotalrefcount(), available
|
|
@@ -211,10 +211,11 @@ def test_endarray_leak():
|
|
|
211
211
|
return list(seq)
|
|
212
212
|
|
|
213
213
|
j1 = rj.loads(value)
|
|
214
|
-
|
|
214
|
+
# Uhm, with Py 3.14 the refcount is 2...
|
|
215
|
+
assert 2 <= sys.getrefcount(j1['v']) <= 3
|
|
215
216
|
|
|
216
217
|
j2 = Decoder1()(value)
|
|
217
|
-
assert sys.getrefcount(j2['v'])
|
|
218
|
+
assert 2 <= sys.getrefcount(j2['v']) <= 3
|
|
218
219
|
|
|
219
220
|
j3 = Decoder2()(value)
|
|
220
|
-
assert sys.getrefcount(j3['v'])
|
|
221
|
+
assert 2 <= sys.getrefcount(j3['v']) <= 3
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_rapidjson-1.21 → python_rapidjson-1.23}/python_rapidjson.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/cursorstreamwrapper.h
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/filereadstream.h
RENAMED
|
File without changes
|
{python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/filewritestream.h
RENAMED
|
File without changes
|
|
File without changes
|
{python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/internal/biginteger.h
RENAMED
|
File without changes
|
{python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/internal/clzll.h
RENAMED
|
File without changes
|
{python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/internal/diyfp.h
RENAMED
|
File without changes
|
|
File without changes
|
{python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/internal/ieee754.h
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/internal/pow10.h
RENAMED
|
File without changes
|
{python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/internal/regex.h
RENAMED
|
File without changes
|
{python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/internal/stack.h
RENAMED
|
File without changes
|
{python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/internal/strfunc.h
RENAMED
|
File without changes
|
{python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/internal/strtod.h
RENAMED
|
File without changes
|
|
File without changes
|
{python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/istreamwrapper.h
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/msinttypes/inttypes.h
RENAMED
|
File without changes
|
{python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/msinttypes/stdint.h
RENAMED
|
File without changes
|
{python_rapidjson-1.21 → python_rapidjson-1.23}/rapidjson/include/rapidjson/ostreamwrapper.h
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|