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