python-rapidjson 1.24__cp315-cp315-win_amd64.whl

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.
@@ -0,0 +1,2 @@
1
+ Version: 1.13.0
2
+ Arguments: ['C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-w6qrw0_g\\cp315-win_amd64\\build\\venv\\Scripts\\delvewheel', 'repair', '-w', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-w6qrw0_g\\cp315-win_amd64\\repaired_wheel', '-v', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-w6qrw0_g\\cp315-win_amd64\\built_wheel\\python_rapidjson-1.24-cp315-cp315-win_amd64.whl']
@@ -0,0 +1,898 @@
1
+ Metadata-Version: 2.4
2
+ Name: python-rapidjson
3
+ Version: 1.24
4
+ Summary: Python wrapper around rapidjson
5
+ Home-page: https://github.com/python-rapidjson/python-rapidjson
6
+ Author: Ken Robbins
7
+ Author-email: ken@kenrobbins.com
8
+ Maintainer: Lele Gaifax
9
+ Maintainer-email: lele@metapensiero.it
10
+ License: MIT License
11
+ Keywords: json jsonc rapidjson
12
+ Classifier: Development Status :: 5 - Production/Stable
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Programming Language :: C++
15
+ Classifier: Programming Language :: Python :: 3 :: Only
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Programming Language :: Python :: 3.14
22
+ Classifier: Programming Language :: Python
23
+ Description-Content-Type: text/x-rst
24
+ License-File: LICENSE
25
+ Dynamic: author
26
+ Dynamic: author-email
27
+ Dynamic: classifier
28
+ Dynamic: description
29
+ Dynamic: description-content-type
30
+ Dynamic: home-page
31
+ Dynamic: keywords
32
+ Dynamic: license
33
+ Dynamic: license-file
34
+ Dynamic: maintainer
35
+ Dynamic: maintainer-email
36
+ Dynamic: summary
37
+
38
+ .. -*- coding: utf-8 -*-
39
+ .. :Project: python-rapidjson -- Introduction
40
+ .. :Author: Ken Robbins <ken@kenrobbins.com>
41
+ .. :License: MIT License
42
+ .. :Copyright: © 2015 Ken Robbins
43
+ .. :Copyright: © 2016, 2017, 2018, 2020, 2022, 2024, 2025 Lele Gaifax
44
+ ..
45
+
46
+ ==================
47
+ python-rapidjson
48
+ ==================
49
+
50
+ Python wrapper around RapidJSON
51
+ ===============================
52
+
53
+ :Authors: Ken Robbins <ken@kenrobbins.com>; Lele Gaifax <lele@metapensiero.it>
54
+ :License: `MIT License`__
55
+ :Status: |build| |doc|
56
+
57
+ __ https://raw.githubusercontent.com/python-rapidjson/python-rapidjson/master/LICENSE
58
+ .. |build| image:: https://travis-ci.org/python-rapidjson/python-rapidjson.svg?branch=master
59
+ :target: https://travis-ci.org/python-rapidjson/python-rapidjson
60
+ :alt: Build status
61
+ .. |doc| image:: https://readthedocs.org/projects/python-rapidjson/badge/?version=latest
62
+ :target: https://readthedocs.org/projects/python-rapidjson/builds/
63
+ :alt: Documentation status
64
+
65
+ RapidJSON_ is an extremely fast C++ JSON parser and serialization library: this module
66
+ wraps it into a Python 3 extension, exposing its serialization/deserialization (to/from
67
+ either ``bytes``, ``str`` or *file-like* instances) and `JSON Schema`__ validation
68
+ capabilities.
69
+
70
+ Latest version documentation is automatically rendered by `Read the Docs`__.
71
+
72
+ __ http://json-schema.org/documentation.html
73
+ __ https://python-rapidjson.readthedocs.io/en/latest/
74
+
75
+
76
+ Getting Started
77
+ ---------------
78
+
79
+ First install ``python-rapidjson``:
80
+
81
+ .. code-block:: bash
82
+
83
+ $ pip install python-rapidjson
84
+
85
+ or, if you prefer `Conda`__:
86
+
87
+ .. code-block:: bash
88
+
89
+ $ conda install -c conda-forge python-rapidjson
90
+
91
+ __ https://conda.io/docs/
92
+
93
+ Basic usage looks like this:
94
+
95
+ .. code-block:: python
96
+
97
+ >>> import rapidjson
98
+ >>> data = {'foo': 100, 'bar': 'baz'}
99
+ >>> rapidjson.dumps(data)
100
+ '{"foo":100,"bar":"baz"}'
101
+ >>> rapidjson.loads('{"bar":"baz","foo":100}')
102
+ {'bar': 'baz', 'foo': 100}
103
+ >>>
104
+ >>> class Stream:
105
+ ... def write(self, data):
106
+ ... print("Chunk:", data)
107
+ ...
108
+ >>> rapidjson.dump(data, Stream(), chunk_size=5)
109
+ Chunk: b'{"foo'
110
+ Chunk: b'":100'
111
+ Chunk: b',"bar'
112
+ Chunk: b'":"ba'
113
+ Chunk: b'z"}'
114
+
115
+ Most functionalities are exposed both as *functions* and as *classes*.
116
+
117
+ The following uses a *relaxed syntax* ``Decoder`` instance, that handles JSONC__ and
118
+ *trailing commas*:
119
+
120
+ __ https://jsonc.org/
121
+
122
+ .. code-block:: python
123
+
124
+ >>> from rapidjson import Decoder
125
+ >>> from rapidjson import PM_COMMENTS, PM_TRAILING_COMMAS
126
+ >>> decoder = Decoder(parse_mode=PM_COMMENTS | PM_TRAILING_COMMAS)
127
+ >>> decoder('''
128
+ ... {
129
+ ... "bar": /* Block comment */ "baz",
130
+ ... "foo":100, // Trailing comma and comment
131
+ ... }
132
+ ... ''')
133
+ {'bar': 'baz', 'foo': 100}
134
+
135
+
136
+ Development
137
+ -----------
138
+
139
+ If you want to install the development version (maybe to contribute fixes or
140
+ enhancements) you may clone the repository:
141
+
142
+ .. code-block:: bash
143
+
144
+ $ git clone --recursive https://github.com/python-rapidjson/python-rapidjson.git
145
+
146
+ .. note:: The ``--recursive`` option is needed because we use a *submodule* to
147
+ include RapidJSON_ sources. Alternatively you can do a plain
148
+ ``clone`` immediately followed by a ``git submodule update --init``.
149
+
150
+ Alternatively, if you already have (a *compatible* version of)
151
+ RapidJSON includes around, you can compile the module specifying
152
+ their location with the option ``--rj-include-dir``, for example:
153
+
154
+ .. code-block:: shell
155
+
156
+ $ python3 setup.py build --rj-include-dir=/usr/include/rapidjson
157
+
158
+ A set of makefiles implement most common operations, such as *build*, *check*
159
+ and *release*; see ``make help`` output for a list of available targets.
160
+
161
+
162
+ Performance
163
+ -----------
164
+
165
+ ``python-rapidjson`` tries to be as performant as possible while staying
166
+ compatible with the ``json`` module.
167
+
168
+ See `this section`__ in the documentation for a comparison with other JSON libraries.
169
+
170
+ __ https://python-rapidjson.readthedocs.io/en/latest/benchmarks.html
171
+
172
+
173
+ Incompatibility
174
+ ---------------
175
+
176
+ Although we tried to implement an API similar to the standard library ``json``, being a
177
+ strict *drop-in* replacement in not our goal and we have decided to depart from there in
178
+ some aspects. See `this section`__ in the documentation for further details.
179
+
180
+ __ https://python-rapidjson.readthedocs.io/en/latest/quickstart.html#incompatibilities
181
+
182
+ .. _RapidJSON: http://rapidjson.org/
183
+
184
+
185
+ Changes
186
+ -------
187
+
188
+ 1.24 (2026-09-05)
189
+ ~~~~~~~~~~~~~~~~~
190
+
191
+ * Fix error handling after ``PyList_SetItem()`` calls (`issue 231`__)
192
+
193
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/231
194
+
195
+ * Fix error handling after ``PyList_Append()`` calls (`issue 232`__)
196
+
197
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/232
198
+
199
+ * Fix crash serializing a list that changes on the fly (`issue 238`__)
200
+
201
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/238
202
+
203
+ * Fix memory leak in ``RawJSON`` constructor with invalid argument (`PR #239`__), thanks
204
+ to Junhyung Lee
205
+
206
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/239
207
+
208
+
209
+ 1.23 (2025-12-07)
210
+ ~~~~~~~~~~~~~~~~~
211
+
212
+ * Fix serialization bug when using ``MM_COERCE_KEYS_TO_STRINGS`` together with
213
+ ``sort_keys=True`` (`issue #229`__)
214
+
215
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/229
216
+
217
+
218
+ 1.22 (2025-10-21)
219
+ ~~~~~~~~~~~~~~~~~
220
+
221
+ * Generate wheels on PyPI using Python 3.14 final release, thanks to cibuildwheel `3.2.1`__
222
+
223
+ __ https://cibuildwheel.pypa.io/en/stable/changelog/#v321
224
+
225
+
226
+ 1.21 (2025-07-10)
227
+ ~~~~~~~~~~~~~~~~~
228
+
229
+ * Use `current master`__ version of rapidjson, thanks to Kyle Gottfried (although I didn't
230
+ merge his `PR #224`__)
231
+
232
+ __ https://github.com/Tencent/rapidjson/compare/ab1842a2dae061284c0a62dca1cc6d5e7e37e346..24b5e7a8b27f42fa16b96fc70aade9106cf7102f
233
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/224
234
+
235
+ * Recompute comparison table with latest versions of other libraries, using Python 3.13
236
+
237
+ * Typing stubs: specify default value for ``stream`` argument of ``Encoder.__call__()``
238
+ (`issue #215`__)
239
+
240
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/215
241
+
242
+ * Use more recent OS images on GH Actions to test and build wheels
243
+
244
+
245
+ 1.20 (2024-08-05)
246
+ ~~~~~~~~~~~~~~~~~
247
+
248
+ * Rectify type hints of ``loads()`` and ``Decoder.__call__()`` (`issue #214`__)
249
+
250
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/214
251
+
252
+ * Ensure ``Validator`` receives valid UTF-8 ``bytes``/``bytearray`` arguments
253
+
254
+ * Generate wheels on PyPI using Python 3.13.0rc1 release, thanks to cibuildwheel `2.20.0`__
255
+
256
+ __ https://cibuildwheel.pypa.io/en/stable/changelog/#v2200
257
+
258
+
259
+ 1.19 (2024-07-28)
260
+ ~~~~~~~~~~~~~~~~~
261
+
262
+ * Properly dump subclasses of ``float`` with custom ``__repr__()`` method ( `issue #213`__)
263
+
264
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/213
265
+
266
+
267
+ 1.18 (2024-06-29)
268
+ ~~~~~~~~~~~~~~~~~
269
+
270
+ * Expose PEP-484 typing stubs, thanks to Rodion Kosianenko and GoodWasHere (`PR #204`__)
271
+
272
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/204
273
+
274
+
275
+ 1.17 (2024-05-18)
276
+ ~~~~~~~~~~~~~~~~~
277
+
278
+ * Use `current master`__ version of rapidjson
279
+
280
+ __ https://github.com/Tencent/rapidjson/compare/5e17dbed34eef33af8f3e734820b5dc547a2a3aa...ab1842a2dae061284c0a62dca1cc6d5e7e37e346
281
+
282
+ * Generate wheels on PyPI using Python 3.13b1 release, thanks to cibuildwheel `2.18.0`__
283
+
284
+ __ https://cibuildwheel.pypa.io/en/stable/changelog/#v2180
285
+
286
+
287
+ 1.16 (2024-02-28)
288
+ ~~~~~~~~~~~~~~~~~
289
+
290
+ * Produce Python 3.8 wheels again, I deactivated it too eagerly, it's in *security fixes
291
+ only* mode, not yet reached its `end-of-life` state
292
+
293
+
294
+ 1.15 (2024-02-28)
295
+ ~~~~~~~~~~~~~~~~~
296
+
297
+ * Honor the `recursion limit`__ also at parse time, to avoid attacks as described by
298
+ `CVE-2024-27454`__
299
+
300
+ __ https://docs.python.org/3.12/library/sys.html#sys.setrecursionlimit
301
+ __ https://monicz.dev/CVE-2024-27454
302
+
303
+
304
+ 1.14 (2023-12-14)
305
+ ~~~~~~~~~~~~~~~~~
306
+
307
+ * Produce binary wheels for macOS/arm64, thanks to timothyjlaurent (`PR #195`__)
308
+
309
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/170
310
+
311
+
312
+ 1.13 (2023-10-29)
313
+ ~~~~~~~~~~~~~~~~~
314
+
315
+ * Fix handling of write_mode in dump functions (problem emerged discussing `issue #191`__)
316
+
317
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/191
318
+
319
+
320
+ 1.12 (2023-10-07)
321
+ ~~~~~~~~~~~~~~~~~
322
+
323
+ * Generate wheels on PyPI using final Python 3.12 release, thanks to cibuildwheel `2.16.2`__
324
+
325
+ __ https://cibuildwheel.readthedocs.io/en/stable/changelog/#v2162
326
+
327
+
328
+ 1.11 (2023-09-11)
329
+ ~~~~~~~~~~~~~~~~~
330
+
331
+ * Use `current master`__ version of rapidjson
332
+
333
+ __ https://github.com/Tencent/rapidjson/compare/083f359f5c36198accc2b9360ce1e32a333231d9...5e17dbed34eef33af8f3e734820b5dc547a2a3aa
334
+
335
+ * Use cibuildwheel `2.15.0`__
336
+
337
+ __ https://cibuildwheel.readthedocs.io/en/stable/changelog/#v2150
338
+
339
+
340
+ 1.10 (2023-03-15)
341
+ ~~~~~~~~~~~~~~~~~
342
+
343
+ * Use `current master`__ version of rapidjson
344
+
345
+ __ https://github.com/Tencent/rapidjson/commit/083f359f5c36198accc2b9360ce1e32a333231d9
346
+
347
+ * Produce ppc64le wheels, thanks to mgiessing (`PR #170`__)
348
+
349
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/170
350
+
351
+ * Use cibuildwheel `2.12.1`__
352
+
353
+ __ https://cibuildwheel.readthedocs.io/en/stable/changelog/#v2121
354
+
355
+
356
+ 1.9 (2022-10-17)
357
+ ~~~~~~~~~~~~~~~~
358
+
359
+ * Produce Python 3.11 wheels, thanks to ``cibuildwheel`` `2.11.1`__
360
+
361
+ __ https://cibuildwheel.readthedocs.io/en/stable/changelog/#v2111
362
+
363
+
364
+ 1.8 (2022-07-07)
365
+ ~~~~~~~~~~~~~~~~
366
+
367
+ * Fix `problem on macOS`__ explicitly requiring C++11, thanks to agate-pris (`issue
368
+ #166`__)
369
+
370
+ __ https://github.com/Tencent/rapidjson/commit/9965ab37f6cfae3d58a0a6e34c76112866ace0b1#commitcomment-77875054
371
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/166
372
+
373
+
374
+ 1.7 (2022-07-06)
375
+ ~~~~~~~~~~~~~~~~
376
+
377
+ * Use `current master`__ version of rapidjson
378
+
379
+ __ https://github.com/Tencent/rapidjson/commit/232389d4f1012dddec4ef84861face2d2ba85709
380
+
381
+ * Update the test suite to work on Pyston, thanks to Kevin Modzelewski (`PR #161`__)
382
+
383
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/161
384
+
385
+
386
+ 1.6 (2022-02-19)
387
+ ~~~~~~~~~~~~~~~~
388
+
389
+ * Fix memory leak when using ``end_array`` (`issue #160`__)
390
+
391
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/160
392
+
393
+
394
+ 1.5 (2021-10-16)
395
+ ~~~~~~~~~~~~~~~~
396
+
397
+ * Fix serialization bug when using DM_UNIX_TIME in a non-C locale context
398
+
399
+
400
+ 1.4 (2021-06-25)
401
+ ~~~~~~~~~~~~~~~~
402
+
403
+ * Build binary wheel for aarch64, thanks to odidev (`PR #156`__)
404
+
405
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/156
406
+
407
+
408
+ 1.3 (2021-06-25)
409
+ ~~~~~~~~~~~~~~~~
410
+
411
+ * Yet another attempt to fix automatic wheels upload
412
+
413
+
414
+ 1.2 (2021-06-25)
415
+ ~~~~~~~~~~~~~~~~
416
+
417
+ * Fix automatic wheels upload from GH Actions to PyPI
418
+
419
+
420
+ 1.1 (2021-06-25)
421
+ ~~~~~~~~~~~~~~~~
422
+
423
+ * Reduce decoder memory consumption by uniquifiying keys in the loaded dictionaries
424
+
425
+ * Implement an alternative way of transmogrify JSON objects, similar to ``json``\ 's
426
+ ``object_pairs_hook`` load option (`issue #154`__)
427
+
428
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/154
429
+
430
+
431
+ 1.0 (2020-12-13)
432
+ ~~~~~~~~~~~~~~~~
433
+
434
+ * Require Python 3.6 or greater
435
+
436
+ * New serialization options, ``iterable_mode`` and ``mapping_mode``, to give some control
437
+ on how generic iterables and mappings get encoded (fix `issue #149`__ and
438
+ `issue #150`__)
439
+
440
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/149
441
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/150
442
+
443
+ * Internal refactorings, folding "skipkeys" and "sort_keys" arguments into the
444
+ mapping_mode options, respectively as MM_SKIP_NON_STRING_KEYS and MM_SORT_KEYS: "old"
445
+ arguments kept for backward compatibility
446
+
447
+ * Bump major version to 1, tag as "production/stable" and switch to a simpler X.Y
448
+ versioning schema
449
+
450
+
451
+ 0.9.4 (2020-11-16)
452
+ ~~~~~~~~~~~~~~~~~~
453
+
454
+ * Fix memory leak loading an invalid JSON (`issue #148`__)
455
+
456
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/148
457
+
458
+
459
+ 0.9.3 (2020-10-24)
460
+ ~~~~~~~~~~~~~~~~~~
461
+
462
+ * Fix access to ``Encoder`` instance attributes (`issue #147`__)
463
+
464
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/147
465
+
466
+
467
+ 0.9.2 (2020-10-24)
468
+ ~~~~~~~~~~~~~~~~~~
469
+
470
+ * Use `current master`__ version of rapidjson
471
+
472
+ __ https://github.com/Tencent/rapidjson/commit/0ccdbf364c577803e2a751f5aededce935314313
473
+
474
+ * Enable GH Actions-based test workflow, thanks to Martin Thoma (`PR #143`__)
475
+
476
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/143
477
+
478
+ * Produce Python 3.9 wheels, disable testing under Python < 3.6
479
+
480
+ * Make the character used for indentation in pretty mode a parameter (`issue #135`__)
481
+
482
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/135
483
+
484
+ * Handle wider precision range in timestamps fractional seconds (`PR 133`__), thanks to
485
+ Karl Seguin
486
+
487
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/133
488
+
489
+ * Add comparison benchmarks against orjson and hyperjson (`issue #130`__ and `PR #131`__,
490
+ thanks to Sebastian Pipping)
491
+
492
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/130
493
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/131
494
+
495
+
496
+ 0.9.1 (2019-11-13)
497
+ ~~~~~~~~~~~~~~~~~~
498
+
499
+ * Fix memory leak in case of failed validation (`issue #126`__)
500
+
501
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/126
502
+
503
+
504
+ 0.9.0 (2019-11-13)
505
+ ~~~~~~~~~~~~~~~~~~
506
+
507
+ * Produce Python 3.8 wheels
508
+
509
+ * Compatibility fix for Python 3.8 (`issue #125`__)
510
+
511
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/125
512
+
513
+ * New dump option ``write_mode``, supporting RapidJSON's ``kFormatSingleLineArray`` option
514
+ (`issue #123`__), thanks to Nguyễn Hồng Quân for the initial implementation (`PR #124`__)
515
+
516
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/123
517
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/124
518
+
519
+
520
+ 0.8.0 (2019-08-09)
521
+ ~~~~~~~~~~~~~~~~~~
522
+
523
+ * New serialization option ``bytes_mode`` to control how bytes instances get encoded
524
+ (`issue #122`__)
525
+
526
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/122
527
+
528
+
529
+ 0.7.2 (2019-06-09)
530
+ ~~~~~~~~~~~~~~~~~~
531
+
532
+ * Hopefully fix the memory leak when loading from a stream (`issue #117`__)
533
+
534
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/117
535
+
536
+
537
+ 0.7.1 (2019-05-11)
538
+ ~~~~~~~~~~~~~~~~~~
539
+
540
+ * Raise a more specific exception on loading errors, ``JSONDecodeError``, instead of
541
+ generic ``ValueError`` (`issue #118`__)
542
+
543
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/118
544
+
545
+ * Fix optimization path when using ``OrderedDict``\ s (`issue #119`__)
546
+
547
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/119
548
+
549
+ * Fix serialization of ``IntEnum``\ s (`issue #121`__)
550
+
551
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/121
552
+
553
+ * I spent *quite a lot* of time investigating on the memory leak when loading from a
554
+ stream (`issue #117`__): as I was not able to fully replicate the problem, I cannot be
555
+ sure I solved the problem... sorry!
556
+
557
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/117
558
+
559
+
560
+ 0.7.0 (2019-02-11)
561
+ ~~~~~~~~~~~~~~~~~~
562
+
563
+ * Raise correct exception in code samples (`PR #109`__), thanks to Thomas Dähling
564
+
565
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/109
566
+
567
+ * Fix compilation with system-wide install of rapidjson (`issue #110`__)
568
+
569
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/110
570
+
571
+ * Use current master version of rapidjson, that includes a `fix`__ for its `issue #1368`__
572
+ and `issue #1336`__, and cures several compilation warnings as well (`issue #112`__ and
573
+ `issue #107`__)
574
+
575
+ __ https://github.com/Tencent/rapidjson/commit/f5e5d47fac0f654749c4d6267015005b74643dff
576
+ __ https://github.com/Tencent/rapidjson/issues/1368
577
+ __ https://github.com/Tencent/rapidjson/issues/1336
578
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/112
579
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/107
580
+
581
+ * Fix memory leak when using ``object_hook`` (`issue #115`__)
582
+
583
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/115
584
+
585
+
586
+ 0.6.3 (2018-07-11)
587
+ ~~~~~~~~~~~~~~~~~~
588
+
589
+ * No visible changes, but now PyPI carries binary wheels for Python 3.7.
590
+
591
+
592
+ 0.6.2 (2018-06-08)
593
+ ~~~~~~~~~~~~~~~~~~
594
+
595
+ * Use a more specific ValidationError, to differentiate from invalid JSON
596
+
597
+
598
+ 0.6.1 (2018-06-06)
599
+ ~~~~~~~~~~~~~~~~~~
600
+
601
+ * Nothing new, attempt to build Python 3.6 binary wheels on Travis CI
602
+
603
+
604
+ 0.6.0 (2018-06-06)
605
+ ~~~~~~~~~~~~~~~~~~
606
+
607
+ * Add a new comparison table involving ``ensure_ascii`` (`issue #98`__)
608
+
609
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/98
610
+
611
+ * Use Python's ``repr()`` to emit float values instead of rapidjson's ``dtoa()`` (`issue
612
+ #101`__)
613
+
614
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/101
615
+
616
+ * Use a newer (although unreleased) version of rapidjson to fix an `issue`__ with
617
+ JSONSchema validation (`PR #103`__), thanks to Anthony Miyaguchi
618
+
619
+ __ https://github.com/Tencent/rapidjson/issues/825
620
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/103
621
+
622
+
623
+ 0.5.2 (2018-03-31)
624
+ ~~~~~~~~~~~~~~~~~~
625
+
626
+ * Tiny tweak to restore macOS build on Travis CI
627
+
628
+
629
+ 0.5.1 (2018-03-31)
630
+ ~~~~~~~~~~~~~~~~~~
631
+
632
+ * Minor tweaks to CI and PyPI deploy configuration
633
+
634
+
635
+ 0.5.0 (2018-03-31)
636
+ ~~~~~~~~~~~~~~~~~~
637
+
638
+ * New ``RawJSON`` class, allowing inclusion of *pre-serialized* content (`PR #95`__ and
639
+ `PR #96`__), thanks to Silvio Tomatis
640
+
641
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/95
642
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/96
643
+
644
+
645
+ 0.4.3 (2018-01-14)
646
+ ~~~~~~~~~~~~~~~~~~
647
+
648
+ * Deserialize from ``bytes`` and ``bytearray`` instances, ensuring they
649
+ contain valid UTF-8 data
650
+
651
+ * Speed up parsing of floating point numbers, avoiding intermediary conversion
652
+ to a Python string (`PR #94`__)
653
+
654
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/94
655
+
656
+
657
+ 0.4.2 (2018-01-09)
658
+ ~~~~~~~~~~~~~~~~~~
659
+
660
+ * Fix precision handling of DM_UNIX_TIME timestamps
661
+
662
+
663
+ 0.4.1 (2018-01-08)
664
+ ~~~~~~~~~~~~~~~~~~
665
+
666
+ * Fix memory leaks in ``Decoder()`` and ``Encoder()`` classes, related to
667
+ bad handling of ``PyObject_GetAttr()`` result value
668
+
669
+ * Fix compatibility with Python 3.7a
670
+
671
+
672
+ 0.4.0 (2018-01-05)
673
+ ~~~~~~~~~~~~~~~~~~
674
+
675
+ * Implemented the streaming interface, see `load()`__ and `dump()`__ (`issue #80`__)
676
+
677
+ __ https://python-rapidjson.readthedocs.io/en/latest/load.html
678
+ __ https://python-rapidjson.readthedocs.io/en/latest/dump.html
679
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/80
680
+
681
+ **Backward incompatibility**: now the *flags* arguments on all the functions are
682
+ *keyword only*, to mimic stdlib's ``json`` style
683
+
684
+
685
+ 0.3.2 (2017-12-21)
686
+ ~~~~~~~~~~~~~~~~~~
687
+
688
+ * Reduce compiler warnings (`issue #87`__)
689
+
690
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/87
691
+
692
+
693
+ 0.3.1 (2017-12-20)
694
+ ~~~~~~~~~~~~~~~~~~
695
+
696
+ * Fix Travis CI recipe to accomodate MacOS
697
+
698
+
699
+ 0.3.0 (2017-12-20)
700
+ ~~~~~~~~~~~~~~~~~~
701
+
702
+ * Fix compilation on MacOS (`issue #78`__)
703
+
704
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/78
705
+
706
+ * Handle generic iterables (`PR #89`__)
707
+
708
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/89
709
+
710
+ **Backward incompatibility**: the ``dumps()`` function and the ``Encoder()``
711
+ constructor used to accept a ``max_recursion_depth`` argument, to control
712
+ the maximum allowed nesting of Python structures; since the underlying
713
+ function is now effectively recursive, it has been replaced by the generic
714
+ `sys.setrecursionlimit()`__ mechanism
715
+
716
+ __ https://docs.python.org/3.6/library/sys.html#sys.setrecursionlimit
717
+
718
+
719
+ 0.2.7 (2017-12-08)
720
+ ~~~~~~~~~~~~~~~~~~
721
+
722
+ * Restore compatibility with Python < 3.6
723
+
724
+
725
+ 0.2.6 (2017-12-08)
726
+ ~~~~~~~~~~~~~~~~~~
727
+
728
+ * Fix memory leaks when using object_hook/start_object/end_object
729
+
730
+
731
+ 0.2.5 (2017-09-30)
732
+ ~~~~~~~~~~~~~~~~~~
733
+
734
+ * Fix bug where error handling code could raise an exception causing a
735
+ confusing exception to be returned (`PR #82`__)
736
+
737
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/82
738
+
739
+ * Fix bug where loads's ``object_hook`` and dumps's ``default`` arguments
740
+ could not be passed ``None`` explicitly (`PR #83`__)
741
+
742
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/83
743
+
744
+ * Fix crash when dealing with surrogate pairs (`issue #81`__)
745
+
746
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/81
747
+
748
+
749
+ 0.2.4 (2017-09-17)
750
+ ~~~~~~~~~~~~~~~~~~
751
+
752
+ * Fix compatibility with MacOS/clang
753
+
754
+
755
+ 0.2.3 (2017-08-24)
756
+ ~~~~~~~~~~~~~~~~~~
757
+
758
+ * Limit the precision of DM_UNIX_TIME timestamps to six decimal digits
759
+
760
+
761
+ 0.2.2 (2017-08-24)
762
+ ~~~~~~~~~~~~~~~~~~
763
+
764
+ * Nothing new, attempt to fix production of Python 3.6 binary wheels
765
+
766
+
767
+ 0.2.1 (2017-08-24)
768
+ ~~~~~~~~~~~~~~~~~~
769
+
770
+ * Nothing new, attempt to fix production of Python 3.6 binary wheels
771
+
772
+
773
+ 0.2.0 (2017-08-24)
774
+ ~~~~~~~~~~~~~~~~~~
775
+
776
+ * New ``parse_mode`` option, implementing relaxed JSON syntax (`issue #73`__)
777
+
778
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/73
779
+
780
+ * New ``Encoder`` and ``Decoder``, implementing a class-based interface
781
+
782
+ * New ``Validator``, exposing the underlying *JSON schema* validation (`issue #71`__)
783
+
784
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/71
785
+
786
+
787
+ 0.1.0 (2017-08-16)
788
+ ~~~~~~~~~~~~~~~~~~
789
+
790
+ * Remove beta status
791
+
792
+
793
+ 0.1.0b4 (2017-08-14)
794
+ ~~~~~~~~~~~~~~~~~~~~
795
+
796
+ * Make execution of the test suite on Appveyor actually happen
797
+
798
+
799
+ 0.1.0b3 (2017-08-12)
800
+ ~~~~~~~~~~~~~~~~~~~~
801
+
802
+ * Exclude CI configurations from the source distribution
803
+
804
+
805
+ 0.1.0b2 (2017-08-12)
806
+ ~~~~~~~~~~~~~~~~~~~~
807
+
808
+ * Fix Powershell wheel upload script in appveyor configuration
809
+
810
+
811
+ 0.1.0b1 (2017-08-12)
812
+ ~~~~~~~~~~~~~~~~~~~~
813
+
814
+ * Compilable with somewhat old g++ (`issue #69`__)
815
+
816
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/69
817
+
818
+ * **Backward incompatibilities**:
819
+
820
+ - all ``DATETIME_MODE_XXX`` constants have been shortened to ``DM_XXX``
821
+ ``DATETIME_MODE_ISO8601_UTC`` has been renamed to ``DM_SHIFT_TO_UTC``
822
+
823
+ - all ``UUID_MODE_XXX`` constants have been shortened to ``UM_XXX``
824
+
825
+ * New option ``DM_UNIX_TIME`` to serialize date, datetime and time values as
826
+ `UNIX timestamps`__ targeting `issue #61`__
827
+
828
+ __ https://en.wikipedia.org/wiki/Unix_time
829
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/61
830
+
831
+ * New option ``DM_NAIVE_IS_UTC`` to treat naïve datetime and time values as if
832
+ they were in the UTC timezone (also for issue #61)
833
+
834
+ * New keyword argument ``number_mode`` to use underlying C library numbers
835
+
836
+ * Binary wheels for GNU/Linux and Windows on PyPI (one would hope: this is the
837
+ reason for the beta1 release)
838
+
839
+
840
+ 0.0.11 (2017-03-05)
841
+ ~~~~~~~~~~~~~~~~~~~
842
+
843
+ * Fix a couple of refcount handling glitches, hopefully targeting `issue
844
+ #48`__.
845
+
846
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/48
847
+
848
+
849
+ 0.0.10 (2017-03-02)
850
+ ~~~~~~~~~~~~~~~~~~~
851
+
852
+ * Fix source distribution to contain all required stuff (`PR #64`__)
853
+
854
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/64
855
+
856
+
857
+ 0.0.9 (2017-03-02)
858
+ ~~~~~~~~~~~~~~~~~~
859
+
860
+ * CI testing on GitHub
861
+
862
+ * Allow using locally installed RapidJSON library (`issue #60`__)
863
+
864
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/60
865
+
866
+ * Bug fixes (`issue #37`__, `issue #51`__, `issue #57`__)
867
+
868
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/37
869
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/51
870
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/57
871
+
872
+
873
+ 0.0.8 (2016-12-09)
874
+ ~~~~~~~~~~~~~~~~~~
875
+
876
+ * Use unpatched RapidJSON 1.1 (`PR #46`__)
877
+
878
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/46
879
+
880
+ * Handle serialization and deserialization of datetime, date and time
881
+ instances (`PR #35`__) and of UUID instances (`PR #40`__)
882
+
883
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/35
884
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/40
885
+
886
+ * Sphinx based documentation (`PR #44`__)
887
+
888
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/44
889
+
890
+ * Refresh benchmarks (`PR #45`__)
891
+
892
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/45
893
+
894
+ * Bug fixes (`issue #25`__, `issue #38`__, `PR #43`__)
895
+
896
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/25
897
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/38
898
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/43
@@ -0,0 +1,10 @@
1
+ rapidjson.cp315-win_amd64.pyd,sha256=nz-XRYsNp1gJGjPaxaXJRMGSCO-JIEWKau3hwf_Vk6Y,359936
2
+ python_rapidjson-1.24.data/platlib/msvcp140-a4c2229bdc2a2a630acdc095b4d86008.dll,sha256=pMIim9wqKmMKzcCVtNhgCOXD47x3cxdDVPPaT1vrnN4,575056
3
+ python_rapidjson-1.24.dist-info/DELVEWHEEL,sha256=tKsXnXAEpHlmz0mNrsSZohmnDWgACU3ycocs0ErbX-4,414
4
+ python_rapidjson-1.24.dist-info/METADATA,sha256=MqEK3LwUDuixkqAr7NjQPTQ82r8F38TjiTiuyomXbuw,26060
5
+ python_rapidjson-1.24.dist-info/RECORD,,
6
+ python_rapidjson-1.24.dist-info/top_level.txt,sha256=Z68HubZmoU3a6tE9t-9GAz06mxudnoTwOtpJtI0TnFc,26
7
+ python_rapidjson-1.24.dist-info/WHEEL,sha256=geuJoH1aW6kS7q0cKuoOBUdE-tpBsTvRf9l5rOGbxQs,101
8
+ python_rapidjson-1.24.dist-info/licenses/LICENSE,sha256=cb4pjUjE-jdzMZ9TnuH-IRta-DMS_3YZ97THsUPrDm0,1252
9
+ rapidjson-stubs/__init__.py,sha256=ktFzQ96A71UimARIhpxKRD4dYROmREUYw-jWuDezmQI,316
10
+ rapidjson-stubs/__init__.pyi,sha256=QY5UH-LumiDnpGgCJUVungBle-VkYddfR8xtBoVOJvg,7652
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.0.0)
3
+ Root-Is-Purelib: false
4
+ Tag: cp315-cp315-win_amd64
5
+
@@ -0,0 +1,24 @@
1
+ python-rapidjson is licensed under the MIT license.
2
+
3
+ The MIT License (MIT)
4
+
5
+ Copyright (c) 2015, 2016, 2017 Ken Robbins
6
+ Copyright (c) 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024 Lele Gaifax
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ of this software and associated documentation files (the "Software"), to deal
10
+ in the Software without restriction, including without limitation the rights
11
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ copies of the Software, and to permit persons to whom the Software is
13
+ furnished to do so, subject to the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be included in all
16
+ copies or substantial portions of the Software.
17
+
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
+ SOFTWARE.
@@ -0,0 +1,2 @@
1
+ rapidjson
2
+ rapidjson-stubs
@@ -0,0 +1,10 @@
1
+ """""" # start delvewheel patch
2
+ def _delvewheel_patch_1_13_0():
3
+ import os
4
+ if os.path.isdir(libs_dir := os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, '.'))):
5
+ os.add_dll_directory(libs_dir)
6
+
7
+
8
+ _delvewheel_patch_1_13_0()
9
+ del _delvewheel_patch_1_13_0
10
+ # end delvewheel patch
@@ -0,0 +1,237 @@
1
+ # -*- coding: utf-8 -*-
2
+ # :Project: python-rapidjson -- PEP-484 typing stubs
3
+ # :Author: Rodion Kosianenko <GoodWasHere@gmail.com>
4
+ # :License: MIT License
5
+ # :Copyright: © 2024 Rodion Kosianenko
6
+ # :Copyright: © 2024 Lele Gaifax
7
+ #
8
+
9
+ import typing as t
10
+ from typing_extensions import disjoint_base # type: ignore[attr-defined]
11
+
12
+
13
+ __rapidjson_exact_version__: str
14
+ __rapidjson_version__: str
15
+
16
+
17
+ _JSONType = t.Union[
18
+ str,
19
+ int,
20
+ float,
21
+ bool,
22
+ None,
23
+ t.Dict[str, "_JSONType"],
24
+ t.List["_JSONType"],
25
+ ]
26
+
27
+
28
+ # Const types
29
+ _BM_NONE_TYPE = t.Literal[0]
30
+ _BM_UTF8_TYPE = t.Literal[1]
31
+ _DM_IGNORE_TZ_TYPE = t.Literal[32]
32
+ _DM_ISO8601_TYPE = t.Literal[1]
33
+ _DM_NAIVE_IS_UTC_TYPE = t.Literal[64]
34
+ _DM_NONE_TYPE = t.Literal[0]
35
+ _DM_ONLY_SECONDS_TYPE = t.Literal[16]
36
+ _DM_SHIFT_TO_UTC_TYPE = t.Literal[128]
37
+ _DM_UNIX_TIME_TYPE = t.Literal[2]
38
+ _IM_ANY_ITERABLE_TYPE = t.Literal[0]
39
+ _IM_ONLY_LISTS_TYPE = t.Literal[1]
40
+ _MM_ANY_MAPPING_TYPE = t.Literal[0]
41
+ _MM_COERCE_KEYS_TO_STRINGS_TYPE = t.Literal[2]
42
+ _MM_ONLY_DICTS_TYPE = t.Literal[1]
43
+ _MM_SKIP_NON_STRING_KEYS_TYPE = t.Literal[4]
44
+ _MM_SORT_KEYS_TYPE = t.Literal[8]
45
+ _NM_DECIMAL_TYPE = t.Literal[2]
46
+ _NM_NAN_TYPE = t.Literal[1]
47
+ _NM_NATIVE_TYPE = t.Literal[4]
48
+ _NM_NONE_TYPE = t.Literal[0]
49
+ _PM_COMMENTS_TYPE = t.Literal[1]
50
+ _PM_NONE_TYPE = t.Literal[0]
51
+ _PM_TRAILING_COMMAS_TYPE = t.Literal[2]
52
+ _UM_CANONICAL_TYPE = t.Literal[1]
53
+ _UM_HEX_TYPE = t.Literal[2]
54
+ _UM_NONE_TYPE = t.Literal[0]
55
+ _WM_COMPACT_TYPE = t.Literal[0]
56
+ _WM_PRETTY_TYPE = t.Literal[1]
57
+ _WM_SINGLE_LINE_ARRAY_TYPE = t.Literal[2]
58
+
59
+
60
+ # Const values
61
+ BM_NONE: _BM_NONE_TYPE = 0
62
+ BM_UTF8: _BM_UTF8_TYPE = 1
63
+ DM_IGNORE_TZ: _DM_IGNORE_TZ_TYPE = 32
64
+ DM_ISO8601: _DM_ISO8601_TYPE = 1
65
+ DM_NAIVE_IS_UTC: _DM_NAIVE_IS_UTC_TYPE = 64
66
+ DM_NONE: _DM_NONE_TYPE = 0
67
+ DM_ONLY_SECONDS: _DM_ONLY_SECONDS_TYPE = 16
68
+ DM_SHIFT_TO_UTC: _DM_SHIFT_TO_UTC_TYPE = 128
69
+ DM_UNIX_TIME: _DM_UNIX_TIME_TYPE = 2
70
+ IM_ANY_ITERABLE: _IM_ANY_ITERABLE_TYPE = 0
71
+ IM_ONLY_LISTS: _IM_ONLY_LISTS_TYPE = 1
72
+ MM_ANY_MAPPING: _MM_ANY_MAPPING_TYPE = 0
73
+ MM_COERCE_KEYS_TO_STRINGS: _MM_COERCE_KEYS_TO_STRINGS_TYPE = 2
74
+ MM_ONLY_DICTS: _MM_ONLY_DICTS_TYPE = 1
75
+ MM_SKIP_NON_STRING_KEYS: _MM_SKIP_NON_STRING_KEYS_TYPE = 4
76
+ MM_SORT_KEYS: _MM_SORT_KEYS_TYPE = 8
77
+ NM_DECIMAL: _NM_DECIMAL_TYPE = 2
78
+ NM_NAN: _NM_NAN_TYPE = 1
79
+ NM_NATIVE: _NM_NATIVE_TYPE = 4
80
+ NM_NONE: _NM_NONE_TYPE = 0
81
+ PM_COMMENTS: _PM_COMMENTS_TYPE = 1
82
+ PM_NONE: _PM_NONE_TYPE = 0
83
+ PM_TRAILING_COMMAS: _PM_TRAILING_COMMAS_TYPE = 2
84
+ UM_CANONICAL: _UM_CANONICAL_TYPE = 1
85
+ UM_HEX: _UM_HEX_TYPE = 2
86
+ UM_NONE: _UM_NONE_TYPE = 0
87
+ WM_COMPACT: _WM_COMPACT_TYPE = 0
88
+ WM_PRETTY: _WM_PRETTY_TYPE = 1
89
+ WM_SINGLE_LINE_ARRAY: _WM_SINGLE_LINE_ARRAY_TYPE = 2
90
+
91
+
92
+ # Mode types
93
+ _NumberMode = int
94
+ _DatetimeMode = int
95
+ _UUIDMode = t.Literal[_UM_CANONICAL_TYPE, _UM_HEX_TYPE, _UM_NONE_TYPE]
96
+ _ParseMode = int
97
+ _WriteMode = t.Literal[_WM_COMPACT_TYPE, _WM_PRETTY_TYPE, _WM_SINGLE_LINE_ARRAY_TYPE]
98
+ _BytesMode = t.Literal[_BM_NONE_TYPE, _BM_UTF8_TYPE]
99
+ _IterableMode = t.Literal[_IM_ANY_ITERABLE_TYPE, _IM_ONLY_LISTS_TYPE]
100
+ _MappingMode = int
101
+
102
+
103
+ # Functions
104
+ def dumps(
105
+ obj: t.Any,
106
+ *,
107
+ skipkeys: t.Optional[bool] = False,
108
+ ensure_ascii: t.Optional[bool] = True,
109
+ write_mode: t.Optional[_WriteMode] = WM_COMPACT,
110
+ indent: t.Optional[t.Union[int, str]] = 4,
111
+ default: t.Optional[t.Callable[[t.Any], _JSONType]] = None,
112
+ sort_keys: t.Optional[bool] = False,
113
+ number_mode: t.Optional[_NumberMode] = NM_NAN,
114
+ datetime_mode: t.Optional[_DatetimeMode] = DM_NONE,
115
+ uuid_mode: t.Optional[_UUIDMode] = UM_NONE,
116
+ bytes_mode: t.Optional[_BytesMode] = BM_UTF8,
117
+ iterable_mode: t.Optional[_IterableMode] = IM_ANY_ITERABLE,
118
+ mapping_mode: t.Optional[_MappingMode] = MM_ANY_MAPPING,
119
+ allow_nan: t.Optional[bool] = True,
120
+ ) -> str: ...
121
+ def dump(
122
+ obj: t.Any,
123
+ stream: t.IO,
124
+ *,
125
+ skipkeys: t.Optional[bool] = False,
126
+ ensure_ascii: t.Optional[bool] = True,
127
+ write_mode: t.Optional[_WriteMode] = WM_COMPACT,
128
+ indent: t.Optional[t.Union[int, str]] = 4,
129
+ default: t.Optional[t.Callable[[t.Any], _JSONType]] = None,
130
+ sort_keys: t.Optional[bool] = False,
131
+ number_mode: t.Optional[_NumberMode] = NM_NAN,
132
+ datetime_mode: t.Optional[_DatetimeMode] = DM_NONE,
133
+ uuid_mode: t.Optional[_UUIDMode] = UM_NONE,
134
+ bytes_mode: t.Optional[_BytesMode] = BM_UTF8,
135
+ iterable_mode: t.Optional[_IterableMode] = IM_ANY_ITERABLE,
136
+ mapping_mode: t.Optional[_MappingMode] = MM_ANY_MAPPING,
137
+ chunk_size: t.Optional[int] = 65536,
138
+ allow_nan: t.Optional[bool] = True,
139
+ ) -> None: ...
140
+ def load(
141
+ stream: t.IO,
142
+ *,
143
+ object_hook: t.Optional[t.Callable[[t.Dict[str, t.Any]], t.Any]] = None,
144
+ number_mode: t.Optional[_NumberMode] = NM_NAN,
145
+ datetime_mode: t.Optional[_DatetimeMode] = DM_NONE,
146
+ uuid_mode: t.Optional[_UUIDMode] = UM_NONE,
147
+ parse_mode: t.Optional[_ParseMode] = PM_NONE,
148
+ chunk_size: t.Optional[int] = 65536,
149
+ allow_nan: t.Optional[bool] = True,
150
+ ) -> t.Any: ...
151
+ def loads(
152
+ string: t.Union[str, bytes, bytearray],
153
+ *,
154
+ object_hook: t.Optional[t.Callable[[t.Dict[str, t.Any]], t.Any]] = None,
155
+ number_mode: t.Optional[_NumberMode] = NM_NAN,
156
+ datetime_mode: t.Optional[_DatetimeMode] = DM_NONE,
157
+ uuid_mode: t.Optional[_UUIDMode] = UM_NONE,
158
+ parse_mode: t.Optional[_ParseMode] = PM_NONE,
159
+ allow_nan: t.Optional[bool] = True,
160
+ ) -> t.Any: ...
161
+
162
+
163
+ # Classes
164
+ class JSONDecodeError(Exception): ...
165
+ class ValidationError(Exception): ...
166
+
167
+
168
+ @disjoint_base
169
+ class Decoder:
170
+ datetime_mode: _DatetimeMode
171
+ number_mode: _NumberMode
172
+ parse_mode: _ParseMode
173
+ uuid_mode: _UUIDMode
174
+
175
+ def __new__(
176
+ cls,
177
+ datetime_mode: t.Optional[_DatetimeMode] = DM_NONE,
178
+ number_mode: t.Optional[_NumberMode] = NM_NAN,
179
+ parse_mode: t.Optional[_ParseMode] = PM_NONE,
180
+ uuid_mode: t.Optional[_UUIDMode] = UM_NONE,
181
+ ) -> Decoder: ...
182
+ def __call__(
183
+ self,
184
+ json: t.Union[str, bytes, bytearray, t.IO],
185
+ chunk_size: t.Optional[int] = 65536,
186
+ ) -> t.Any: ...
187
+
188
+
189
+ @disjoint_base
190
+ class Encoder:
191
+ bytes_mode: _BytesMode
192
+ datetime_mode: _DatetimeMode
193
+ ensure_ascii: bool
194
+ indent_char: str
195
+ indent_count: int
196
+ iterable_mode: _IterableMode
197
+ mapping_mode: _MappingMode
198
+ number_mode: _NumberMode
199
+ skip_invalid_keys: bool
200
+ sort_keys: bool
201
+ uuid_mode: _UUIDMode
202
+ write_mode: _WriteMode
203
+
204
+ def __new__(
205
+ cls,
206
+ skip_invalid_keys: t.Optional[bool] = False,
207
+ ensure_ascii: t.Optional[bool] = True,
208
+ write_mode: t.Optional[_WriteMode] = WM_COMPACT,
209
+ indent: t.Optional[t.Union[int, str]] = 4,
210
+ sort_keys: t.Optional[bool] = False,
211
+ number_mode: t.Optional[_NumberMode] = NM_NAN,
212
+ datetime_mode: t.Optional[_DatetimeMode] = DM_NONE,
213
+ uuid_mode: t.Optional[_UUIDMode] = UM_NONE,
214
+ bytes_mode: t.Optional[_BytesMode] = BM_UTF8,
215
+ iterable_mode: t.Optional[_IterableMode] = IM_ANY_ITERABLE,
216
+ mapping_mode: t.Optional[_MappingMode] = MM_ANY_MAPPING,
217
+ ) -> Encoder: ...
218
+ def __call__(
219
+ self,
220
+ obj: t.Any,
221
+ stream: t.Optional[t.IO] = None,
222
+ chunk_size: t.Optional[int] = 65536,
223
+ ) -> t.Optional[str]: ...
224
+
225
+
226
+ @t.final
227
+ class RawJSON:
228
+ value: str
229
+ def __new__(cls, value: str) -> RawJSON: ...
230
+
231
+
232
+ @t.final
233
+ class Validator:
234
+ def __new__(
235
+ cls, json_schema: t.Union[str, bytes, bytearray]
236
+ ) -> Validator: ...
237
+ def __call__(self, json: t.Union[str, bytes, bytearray]) -> None: ...
Binary file