python-rapidjson 1.22__cp314-cp314-win32.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,871 @@
1
+ Metadata-Version: 2.4
2
+ Name: python-rapidjson
3
+ Version: 1.22
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.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Programming Language :: Python :: 3.14
23
+ Classifier: Programming Language :: Python
24
+ Requires-Python: >=3.6
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.22 (2025-10-21)
192
+ ~~~~~~~~~~~~~~~~~
193
+
194
+ * Generate wheels on PyPI using Python 3.14 final release, thanks to cibuildwheel `3.2.1`__
195
+
196
+ __ https://cibuildwheel.pypa.io/en/stable/changelog/#v321
197
+
198
+
199
+ 1.21 (2025-07-10)
200
+ ~~~~~~~~~~~~~~~~~
201
+
202
+ * Use `current master`__ version of rapidjson, thanks to Kyle Gottfried (although I didn't
203
+ merge his `PR #224`__)
204
+
205
+ __ https://github.com/Tencent/rapidjson/compare/ab1842a2dae061284c0a62dca1cc6d5e7e37e346..24b5e7a8b27f42fa16b96fc70aade9106cf7102f
206
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/224
207
+
208
+ * Recompute comparison table with latest versions of other libraries, using Python 3.13
209
+
210
+ * Typing stubs: specify default value for ``stream`` argument of ``Encoder.__call__()``
211
+ (`issue #215`__)
212
+
213
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/215
214
+
215
+ * Use more recent OS images on GH Actions to test and build wheels
216
+
217
+
218
+ 1.20 (2024-08-05)
219
+ ~~~~~~~~~~~~~~~~~
220
+
221
+ * Rectify type hints of ``loads()`` and ``Decoder.__call__()`` (`issue #214`__)
222
+
223
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/214
224
+
225
+ * Ensure ``Validator`` receives valid UTF-8 ``bytes``/``bytearray`` arguments
226
+
227
+ * Generate wheels on PyPI using Python 3.13.0rc1 release, thanks to cibuildwheel `2.20.0`__
228
+
229
+ __ https://cibuildwheel.pypa.io/en/stable/changelog/#v2200
230
+
231
+
232
+ 1.19 (2024-07-28)
233
+ ~~~~~~~~~~~~~~~~~
234
+
235
+ * Properly dump subclasses of ``float`` with custom ``__repr__()`` method ( `issue #213`__)
236
+
237
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/213
238
+
239
+
240
+ 1.18 (2024-06-29)
241
+ ~~~~~~~~~~~~~~~~~
242
+
243
+ * Expose PEP-484 typing stubs, thanks to Rodion Kosianenko and GoodWasHere (`PR #204`__)
244
+
245
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/204
246
+
247
+
248
+ 1.17 (2024-05-18)
249
+ ~~~~~~~~~~~~~~~~~
250
+
251
+ * Use `current master`__ version of rapidjson
252
+
253
+ __ https://github.com/Tencent/rapidjson/compare/5e17dbed34eef33af8f3e734820b5dc547a2a3aa...ab1842a2dae061284c0a62dca1cc6d5e7e37e346
254
+
255
+ * Generate wheels on PyPI using Python 3.13b1 release, thanks to cibuildwheel `2.18.0`__
256
+
257
+ __ https://cibuildwheel.pypa.io/en/stable/changelog/#v2180
258
+
259
+
260
+ 1.16 (2024-02-28)
261
+ ~~~~~~~~~~~~~~~~~
262
+
263
+ * Produce Python 3.8 wheels again, I deactivated it too eagerly, it's in *security fixes
264
+ only* mode, not yet reached its `end-of-life` state
265
+
266
+
267
+ 1.15 (2024-02-28)
268
+ ~~~~~~~~~~~~~~~~~
269
+
270
+ * Honor the `recursion limit`__ also at parse time, to avoid attacks as described by
271
+ `CVE-2024-27454`__
272
+
273
+ __ https://docs.python.org/3.12/library/sys.html#sys.setrecursionlimit
274
+ __ https://monicz.dev/CVE-2024-27454
275
+
276
+
277
+ 1.14 (2023-12-14)
278
+ ~~~~~~~~~~~~~~~~~
279
+
280
+ * Produce binary wheels for macOS/arm64, thanks to timothyjlaurent (`PR #195`__)
281
+
282
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/170
283
+
284
+
285
+ 1.13 (2023-10-29)
286
+ ~~~~~~~~~~~~~~~~~
287
+
288
+ * Fix handling of write_mode in dump functions (problem emerged discussing `issue #191`__)
289
+
290
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/191
291
+
292
+
293
+ 1.12 (2023-10-07)
294
+ ~~~~~~~~~~~~~~~~~
295
+
296
+ * Generate wheels on PyPI using final Python 3.12 release, thanks to cibuildwheel `2.16.2`__
297
+
298
+ __ https://cibuildwheel.readthedocs.io/en/stable/changelog/#v2162
299
+
300
+
301
+ 1.11 (2023-09-11)
302
+ ~~~~~~~~~~~~~~~~~
303
+
304
+ * Use `current master`__ version of rapidjson
305
+
306
+ __ https://github.com/Tencent/rapidjson/compare/083f359f5c36198accc2b9360ce1e32a333231d9...5e17dbed34eef33af8f3e734820b5dc547a2a3aa
307
+
308
+ * Use cibuildwheel `2.15.0`__
309
+
310
+ __ https://cibuildwheel.readthedocs.io/en/stable/changelog/#v2150
311
+
312
+
313
+ 1.10 (2023-03-15)
314
+ ~~~~~~~~~~~~~~~~~
315
+
316
+ * Use `current master`__ version of rapidjson
317
+
318
+ __ https://github.com/Tencent/rapidjson/commit/083f359f5c36198accc2b9360ce1e32a333231d9
319
+
320
+ * Produce ppc64le wheels, thanks to mgiessing (`PR #170`__)
321
+
322
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/170
323
+
324
+ * Use cibuildwheel `2.12.1`__
325
+
326
+ __ https://cibuildwheel.readthedocs.io/en/stable/changelog/#v2121
327
+
328
+
329
+ 1.9 (2022-10-17)
330
+ ~~~~~~~~~~~~~~~~
331
+
332
+ * Produce Python 3.11 wheels, thanks to ``cibuildwheel`` `2.11.1`__
333
+
334
+ __ https://cibuildwheel.readthedocs.io/en/stable/changelog/#v2111
335
+
336
+
337
+ 1.8 (2022-07-07)
338
+ ~~~~~~~~~~~~~~~~
339
+
340
+ * Fix `problem on macOS`__ explicitly requiring C++11, thanks to agate-pris (`issue
341
+ #166`__)
342
+
343
+ __ https://github.com/Tencent/rapidjson/commit/9965ab37f6cfae3d58a0a6e34c76112866ace0b1#commitcomment-77875054
344
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/166
345
+
346
+
347
+ 1.7 (2022-07-06)
348
+ ~~~~~~~~~~~~~~~~
349
+
350
+ * Use `current master`__ version of rapidjson
351
+
352
+ __ https://github.com/Tencent/rapidjson/commit/232389d4f1012dddec4ef84861face2d2ba85709
353
+
354
+ * Update the test suite to work on Pyston, thanks to Kevin Modzelewski (`PR #161`__)
355
+
356
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/161
357
+
358
+
359
+ 1.6 (2022-02-19)
360
+ ~~~~~~~~~~~~~~~~
361
+
362
+ * Fix memory leak when using ``end_array`` (`issue #160`__)
363
+
364
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/160
365
+
366
+
367
+ 1.5 (2021-10-16)
368
+ ~~~~~~~~~~~~~~~~
369
+
370
+ * Fix serialization bug when using DM_UNIX_TIME in a non-C locale context
371
+
372
+
373
+ 1.4 (2021-06-25)
374
+ ~~~~~~~~~~~~~~~~
375
+
376
+ * Build binary wheel for aarch64, thanks to odidev (`PR #156`__)
377
+
378
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/156
379
+
380
+
381
+ 1.3 (2021-06-25)
382
+ ~~~~~~~~~~~~~~~~
383
+
384
+ * Yet another attempt to fix automatic wheels upload
385
+
386
+
387
+ 1.2 (2021-06-25)
388
+ ~~~~~~~~~~~~~~~~
389
+
390
+ * Fix automatic wheels upload from GH Actions to PyPI
391
+
392
+
393
+ 1.1 (2021-06-25)
394
+ ~~~~~~~~~~~~~~~~
395
+
396
+ * Reduce decoder memory consumption by uniquifiying keys in the loaded dictionaries
397
+
398
+ * Implement an alternative way of transmogrify JSON objects, similar to ``json``\ 's
399
+ ``object_pairs_hook`` load option (`issue #154`__)
400
+
401
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/154
402
+
403
+
404
+ 1.0 (2020-12-13)
405
+ ~~~~~~~~~~~~~~~~
406
+
407
+ * Require Python 3.6 or greater
408
+
409
+ * New serialization options, ``iterable_mode`` and ``mapping_mode``, to give some control
410
+ on how generic iterables and mappings get encoded (fix `issue #149`__ and
411
+ `issue #150`__)
412
+
413
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/149
414
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/150
415
+
416
+ * Internal refactorings, folding "skipkeys" and "sort_keys" arguments into the
417
+ mapping_mode options, respectively as MM_SKIP_NON_STRING_KEYS and MM_SORT_KEYS: "old"
418
+ arguments kept for backward compatibility
419
+
420
+ * Bump major version to 1, tag as "production/stable" and switch to a simpler X.Y
421
+ versioning schema
422
+
423
+
424
+ 0.9.4 (2020-11-16)
425
+ ~~~~~~~~~~~~~~~~~~
426
+
427
+ * Fix memory leak loading an invalid JSON (`issue #148`__)
428
+
429
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/148
430
+
431
+
432
+ 0.9.3 (2020-10-24)
433
+ ~~~~~~~~~~~~~~~~~~
434
+
435
+ * Fix access to ``Encoder`` instance attributes (`issue #147`__)
436
+
437
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/147
438
+
439
+
440
+ 0.9.2 (2020-10-24)
441
+ ~~~~~~~~~~~~~~~~~~
442
+
443
+ * Use `current master`__ version of rapidjson
444
+
445
+ __ https://github.com/Tencent/rapidjson/commit/0ccdbf364c577803e2a751f5aededce935314313
446
+
447
+ * Enable GH Actions-based test workflow, thanks to Martin Thoma (`PR #143`__)
448
+
449
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/143
450
+
451
+ * Produce Python 3.9 wheels, disable testing under Python < 3.6
452
+
453
+ * Make the character used for indentation in pretty mode a parameter (`issue #135`__)
454
+
455
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/135
456
+
457
+ * Handle wider precision range in timestamps fractional seconds (`PR 133`__), thanks to
458
+ Karl Seguin
459
+
460
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/133
461
+
462
+ * Add comparison benchmarks against orjson and hyperjson (`issue #130`__ and `PR #131`__,
463
+ thanks to Sebastian Pipping)
464
+
465
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/130
466
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/131
467
+
468
+
469
+ 0.9.1 (2019-11-13)
470
+ ~~~~~~~~~~~~~~~~~~
471
+
472
+ * Fix memory leak in case of failed validation (`issue #126`__)
473
+
474
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/126
475
+
476
+
477
+ 0.9.0 (2019-11-13)
478
+ ~~~~~~~~~~~~~~~~~~
479
+
480
+ * Produce Python 3.8 wheels
481
+
482
+ * Compatibility fix for Python 3.8 (`issue #125`__)
483
+
484
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/125
485
+
486
+ * New dump option ``write_mode``, supporting RapidJSON's ``kFormatSingleLineArray`` option
487
+ (`issue #123`__), thanks to Nguyễn Hồng Quân for the initial implementation (`PR #124`__)
488
+
489
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/123
490
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/124
491
+
492
+
493
+ 0.8.0 (2019-08-09)
494
+ ~~~~~~~~~~~~~~~~~~
495
+
496
+ * New serialization option ``bytes_mode`` to control how bytes instances get encoded
497
+ (`issue #122`__)
498
+
499
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/122
500
+
501
+
502
+ 0.7.2 (2019-06-09)
503
+ ~~~~~~~~~~~~~~~~~~
504
+
505
+ * Hopefully fix the memory leak when loading from a stream (`issue #117`__)
506
+
507
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/117
508
+
509
+
510
+ 0.7.1 (2019-05-11)
511
+ ~~~~~~~~~~~~~~~~~~
512
+
513
+ * Raise a more specific exception on loading errors, ``JSONDecodeError``, instead of
514
+ generic ``ValueError`` (`issue #118`__)
515
+
516
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/118
517
+
518
+ * Fix optimization path when using ``OrderedDict``\ s (`issue #119`__)
519
+
520
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/119
521
+
522
+ * Fix serialization of ``IntEnum``\ s (`issue #121`__)
523
+
524
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/121
525
+
526
+ * I spent *quite a lot* of time investigating on the memory leak when loading from a
527
+ stream (`issue #117`__): as I was not able to fully replicate the problem, I cannot be
528
+ sure I solved the problem... sorry!
529
+
530
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/117
531
+
532
+
533
+ 0.7.0 (2019-02-11)
534
+ ~~~~~~~~~~~~~~~~~~
535
+
536
+ * Raise correct exception in code samples (`PR #109`__), thanks to Thomas Dähling
537
+
538
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/109
539
+
540
+ * Fix compilation with system-wide install of rapidjson (`issue #110`__)
541
+
542
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/110
543
+
544
+ * Use current master version of rapidjson, that includes a `fix`__ for its `issue #1368`__
545
+ and `issue #1336`__, and cures several compilation warnings as well (`issue #112`__ and
546
+ `issue #107`__)
547
+
548
+ __ https://github.com/Tencent/rapidjson/commit/f5e5d47fac0f654749c4d6267015005b74643dff
549
+ __ https://github.com/Tencent/rapidjson/issues/1368
550
+ __ https://github.com/Tencent/rapidjson/issues/1336
551
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/112
552
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/107
553
+
554
+ * Fix memory leak when using ``object_hook`` (`issue #115`__)
555
+
556
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/115
557
+
558
+
559
+ 0.6.3 (2018-07-11)
560
+ ~~~~~~~~~~~~~~~~~~
561
+
562
+ * No visible changes, but now PyPI carries binary wheels for Python 3.7.
563
+
564
+
565
+ 0.6.2 (2018-06-08)
566
+ ~~~~~~~~~~~~~~~~~~
567
+
568
+ * Use a more specific ValidationError, to differentiate from invalid JSON
569
+
570
+
571
+ 0.6.1 (2018-06-06)
572
+ ~~~~~~~~~~~~~~~~~~
573
+
574
+ * Nothing new, attempt to build Python 3.6 binary wheels on Travis CI
575
+
576
+
577
+ 0.6.0 (2018-06-06)
578
+ ~~~~~~~~~~~~~~~~~~
579
+
580
+ * Add a new comparison table involving ``ensure_ascii`` (`issue #98`__)
581
+
582
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/98
583
+
584
+ * Use Python's ``repr()`` to emit float values instead of rapidjson's ``dtoa()`` (`issue
585
+ #101`__)
586
+
587
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/101
588
+
589
+ * Use a newer (although unreleased) version of rapidjson to fix an `issue`__ with
590
+ JSONSchema validation (`PR #103`__), thanks to Anthony Miyaguchi
591
+
592
+ __ https://github.com/Tencent/rapidjson/issues/825
593
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/103
594
+
595
+
596
+ 0.5.2 (2018-03-31)
597
+ ~~~~~~~~~~~~~~~~~~
598
+
599
+ * Tiny tweak to restore macOS build on Travis CI
600
+
601
+
602
+ 0.5.1 (2018-03-31)
603
+ ~~~~~~~~~~~~~~~~~~
604
+
605
+ * Minor tweaks to CI and PyPI deploy configuration
606
+
607
+
608
+ 0.5.0 (2018-03-31)
609
+ ~~~~~~~~~~~~~~~~~~
610
+
611
+ * New ``RawJSON`` class, allowing inclusion of *pre-serialized* content (`PR #95`__ and
612
+ `PR #96`__), thanks to Silvio Tomatis
613
+
614
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/95
615
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/96
616
+
617
+
618
+ 0.4.3 (2018-01-14)
619
+ ~~~~~~~~~~~~~~~~~~
620
+
621
+ * Deserialize from ``bytes`` and ``bytearray`` instances, ensuring they
622
+ contain valid UTF-8 data
623
+
624
+ * Speed up parsing of floating point numbers, avoiding intermediary conversion
625
+ to a Python string (`PR #94`__)
626
+
627
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/94
628
+
629
+
630
+ 0.4.2 (2018-01-09)
631
+ ~~~~~~~~~~~~~~~~~~
632
+
633
+ * Fix precision handling of DM_UNIX_TIME timestamps
634
+
635
+
636
+ 0.4.1 (2018-01-08)
637
+ ~~~~~~~~~~~~~~~~~~
638
+
639
+ * Fix memory leaks in ``Decoder()`` and ``Encoder()`` classes, related to
640
+ bad handling of ``PyObject_GetAttr()`` result value
641
+
642
+ * Fix compatibility with Python 3.7a
643
+
644
+
645
+ 0.4.0 (2018-01-05)
646
+ ~~~~~~~~~~~~~~~~~~
647
+
648
+ * Implemented the streaming interface, see `load()`__ and `dump()`__ (`issue #80`__)
649
+
650
+ __ https://python-rapidjson.readthedocs.io/en/latest/load.html
651
+ __ https://python-rapidjson.readthedocs.io/en/latest/dump.html
652
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/80
653
+
654
+ **Backward incompatibility**: now the *flags* arguments on all the functions are
655
+ *keyword only*, to mimic stdlib's ``json`` style
656
+
657
+
658
+ 0.3.2 (2017-12-21)
659
+ ~~~~~~~~~~~~~~~~~~
660
+
661
+ * Reduce compiler warnings (`issue #87`__)
662
+
663
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/87
664
+
665
+
666
+ 0.3.1 (2017-12-20)
667
+ ~~~~~~~~~~~~~~~~~~
668
+
669
+ * Fix Travis CI recipe to accomodate MacOS
670
+
671
+
672
+ 0.3.0 (2017-12-20)
673
+ ~~~~~~~~~~~~~~~~~~
674
+
675
+ * Fix compilation on MacOS (`issue #78`__)
676
+
677
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/78
678
+
679
+ * Handle generic iterables (`PR #89`__)
680
+
681
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/89
682
+
683
+ **Backward incompatibility**: the ``dumps()`` function and the ``Encoder()``
684
+ constructor used to accept a ``max_recursion_depth`` argument, to control
685
+ the maximum allowed nesting of Python structures; since the underlying
686
+ function is now effectively recursive, it has been replaced by the generic
687
+ `sys.setrecursionlimit()`__ mechanism
688
+
689
+ __ https://docs.python.org/3.6/library/sys.html#sys.setrecursionlimit
690
+
691
+
692
+ 0.2.7 (2017-12-08)
693
+ ~~~~~~~~~~~~~~~~~~
694
+
695
+ * Restore compatibility with Python < 3.6
696
+
697
+
698
+ 0.2.6 (2017-12-08)
699
+ ~~~~~~~~~~~~~~~~~~
700
+
701
+ * Fix memory leaks when using object_hook/start_object/end_object
702
+
703
+
704
+ 0.2.5 (2017-09-30)
705
+ ~~~~~~~~~~~~~~~~~~
706
+
707
+ * Fix bug where error handling code could raise an exception causing a
708
+ confusing exception to be returned (`PR #82`__)
709
+
710
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/82
711
+
712
+ * Fix bug where loads's ``object_hook`` and dumps's ``default`` arguments
713
+ could not be passed ``None`` explicitly (`PR #83`__)
714
+
715
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/83
716
+
717
+ * Fix crash when dealing with surrogate pairs (`issue #81`__)
718
+
719
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/81
720
+
721
+
722
+ 0.2.4 (2017-09-17)
723
+ ~~~~~~~~~~~~~~~~~~
724
+
725
+ * Fix compatibility with MacOS/clang
726
+
727
+
728
+ 0.2.3 (2017-08-24)
729
+ ~~~~~~~~~~~~~~~~~~
730
+
731
+ * Limit the precision of DM_UNIX_TIME timestamps to six decimal digits
732
+
733
+
734
+ 0.2.2 (2017-08-24)
735
+ ~~~~~~~~~~~~~~~~~~
736
+
737
+ * Nothing new, attempt to fix production of Python 3.6 binary wheels
738
+
739
+
740
+ 0.2.1 (2017-08-24)
741
+ ~~~~~~~~~~~~~~~~~~
742
+
743
+ * Nothing new, attempt to fix production of Python 3.6 binary wheels
744
+
745
+
746
+ 0.2.0 (2017-08-24)
747
+ ~~~~~~~~~~~~~~~~~~
748
+
749
+ * New ``parse_mode`` option, implementing relaxed JSON syntax (`issue #73`__)
750
+
751
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/73
752
+
753
+ * New ``Encoder`` and ``Decoder``, implementing a class-based interface
754
+
755
+ * New ``Validator``, exposing the underlying *JSON schema* validation (`issue #71`__)
756
+
757
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/71
758
+
759
+
760
+ 0.1.0 (2017-08-16)
761
+ ~~~~~~~~~~~~~~~~~~
762
+
763
+ * Remove beta status
764
+
765
+
766
+ 0.1.0b4 (2017-08-14)
767
+ ~~~~~~~~~~~~~~~~~~~~
768
+
769
+ * Make execution of the test suite on Appveyor actually happen
770
+
771
+
772
+ 0.1.0b3 (2017-08-12)
773
+ ~~~~~~~~~~~~~~~~~~~~
774
+
775
+ * Exclude CI configurations from the source distribution
776
+
777
+
778
+ 0.1.0b2 (2017-08-12)
779
+ ~~~~~~~~~~~~~~~~~~~~
780
+
781
+ * Fix Powershell wheel upload script in appveyor configuration
782
+
783
+
784
+ 0.1.0b1 (2017-08-12)
785
+ ~~~~~~~~~~~~~~~~~~~~
786
+
787
+ * Compilable with somewhat old g++ (`issue #69`__)
788
+
789
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/69
790
+
791
+ * **Backward incompatibilities**:
792
+
793
+ - all ``DATETIME_MODE_XXX`` constants have been shortened to ``DM_XXX``
794
+ ``DATETIME_MODE_ISO8601_UTC`` has been renamed to ``DM_SHIFT_TO_UTC``
795
+
796
+ - all ``UUID_MODE_XXX`` constants have been shortened to ``UM_XXX``
797
+
798
+ * New option ``DM_UNIX_TIME`` to serialize date, datetime and time values as
799
+ `UNIX timestamps`__ targeting `issue #61`__
800
+
801
+ __ https://en.wikipedia.org/wiki/Unix_time
802
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/61
803
+
804
+ * New option ``DM_NAIVE_IS_UTC`` to treat naïve datetime and time values as if
805
+ they were in the UTC timezone (also for issue #61)
806
+
807
+ * New keyword argument ``number_mode`` to use underlying C library numbers
808
+
809
+ * Binary wheels for GNU/Linux and Windows on PyPI (one would hope: this is the
810
+ reason for the beta1 release)
811
+
812
+
813
+ 0.0.11 (2017-03-05)
814
+ ~~~~~~~~~~~~~~~~~~~
815
+
816
+ * Fix a couple of refcount handling glitches, hopefully targeting `issue
817
+ #48`__.
818
+
819
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/48
820
+
821
+
822
+ 0.0.10 (2017-03-02)
823
+ ~~~~~~~~~~~~~~~~~~~
824
+
825
+ * Fix source distribution to contain all required stuff (`PR #64`__)
826
+
827
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/64
828
+
829
+
830
+ 0.0.9 (2017-03-02)
831
+ ~~~~~~~~~~~~~~~~~~
832
+
833
+ * CI testing on GitHub
834
+
835
+ * Allow using locally installed RapidJSON library (`issue #60`__)
836
+
837
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/60
838
+
839
+ * Bug fixes (`issue #37`__, `issue #51`__, `issue #57`__)
840
+
841
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/37
842
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/51
843
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/57
844
+
845
+
846
+ 0.0.8 (2016-12-09)
847
+ ~~~~~~~~~~~~~~~~~~
848
+
849
+ * Use unpatched RapidJSON 1.1 (`PR #46`__)
850
+
851
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/46
852
+
853
+ * Handle serialization and deserialization of datetime, date and time
854
+ instances (`PR #35`__) and of UUID instances (`PR #40`__)
855
+
856
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/35
857
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/40
858
+
859
+ * Sphinx based documentation (`PR #44`__)
860
+
861
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/44
862
+
863
+ * Refresh benchmarks (`PR #45`__)
864
+
865
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/45
866
+
867
+ * Bug fixes (`issue #25`__, `issue #38`__, `PR #43`__)
868
+
869
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/25
870
+ __ https://github.com/python-rapidjson/python-rapidjson/issues/38
871
+ __ https://github.com/python-rapidjson/python-rapidjson/pull/43
@@ -0,0 +1,7 @@
1
+ rapidjson.cp314-win32.pyd,sha256=_84Ht8YXkDS5exeAYIrm53d5sPkDJobDKRdxHiYDn3o,305152
2
+ python_rapidjson-1.22.dist-info/licenses/LICENSE,sha256=cb4pjUjE-jdzMZ9TnuH-IRta-DMS_3YZ97THsUPrDm0,1252
3
+ rapidjson-stubs/__init__.pyi,sha256=M1y-UaYlBb-uT_q7_fgv5E6_eRkcRCUT2vfF5lxR5ag,7527
4
+ python_rapidjson-1.22.dist-info/METADATA,sha256=ROlWma07mo6b1GrDyee8pXxO-ZIlSsurMyms3sMsMXs,25268
5
+ python_rapidjson-1.22.dist-info/WHEEL,sha256=avp3B09fSRXVHn4cshTNKc58MtFVN-cVe0NyrqeYT2s,97
6
+ python_rapidjson-1.22.dist-info/top_level.txt,sha256=Z68HubZmoU3a6tE9t-9GAz06mxudnoTwOtpJtI0TnFc,26
7
+ python_rapidjson-1.22.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: false
4
+ Tag: cp314-cp314-win32
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,232 @@
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
+
11
+
12
+ __rapidjson_exact_version__: str
13
+ __rapidjson_version__: str
14
+
15
+
16
+ _JSONType = t.Union[
17
+ str,
18
+ int,
19
+ float,
20
+ bool,
21
+ None,
22
+ t.Dict[str, "_JSONType"],
23
+ t.List["_JSONType"],
24
+ ]
25
+
26
+
27
+ # Const types
28
+ _BM_NONE_TYPE = t.Literal[0]
29
+ _BM_UTF8_TYPE = t.Literal[1]
30
+ _DM_IGNORE_TZ_TYPE = t.Literal[32]
31
+ _DM_ISO8601_TYPE = t.Literal[1]
32
+ _DM_NAIVE_IS_UTC_TYPE = t.Literal[64]
33
+ _DM_NONE_TYPE = t.Literal[0]
34
+ _DM_ONLY_SECONDS_TYPE = t.Literal[16]
35
+ _DM_SHIFT_TO_UTC_TYPE = t.Literal[128]
36
+ _DM_UNIX_TIME_TYPE = t.Literal[2]
37
+ _IM_ANY_ITERABLE_TYPE = t.Literal[0]
38
+ _IM_ONLY_LISTS_TYPE = t.Literal[1]
39
+ _MM_ANY_MAPPING_TYPE = t.Literal[0]
40
+ _MM_COERCE_KEYS_TO_STRINGS_TYPE = t.Literal[2]
41
+ _MM_ONLY_DICTS_TYPE = t.Literal[1]
42
+ _MM_SKIP_NON_STRING_KEYS_TYPE = t.Literal[4]
43
+ _MM_SORT_KEYS_TYPE = t.Literal[8]
44
+ _NM_DECIMAL_TYPE = t.Literal[2]
45
+ _NM_NAN_TYPE = t.Literal[1]
46
+ _NM_NATIVE_TYPE = t.Literal[4]
47
+ _NM_NONE_TYPE = t.Literal[0]
48
+ _PM_COMMENTS_TYPE = t.Literal[1]
49
+ _PM_NONE_TYPE = t.Literal[0]
50
+ _PM_TRAILING_COMMAS_TYPE = t.Literal[2]
51
+ _UM_CANONICAL_TYPE = t.Literal[1]
52
+ _UM_HEX_TYPE = t.Literal[2]
53
+ _UM_NONE_TYPE = t.Literal[0]
54
+ _WM_COMPACT_TYPE = t.Literal[0]
55
+ _WM_PRETTY_TYPE = t.Literal[1]
56
+ _WM_SINGLE_LINE_ARRAY_TYPE = t.Literal[2]
57
+
58
+
59
+ # Const values
60
+ BM_NONE: _BM_NONE_TYPE = 0
61
+ BM_UTF8: _BM_UTF8_TYPE = 1
62
+ DM_IGNORE_TZ: _DM_IGNORE_TZ_TYPE = 32
63
+ DM_ISO8601: _DM_ISO8601_TYPE = 1
64
+ DM_NAIVE_IS_UTC: _DM_NAIVE_IS_UTC_TYPE = 64
65
+ DM_NONE: _DM_NONE_TYPE = 0
66
+ DM_ONLY_SECONDS: _DM_ONLY_SECONDS_TYPE = 16
67
+ DM_SHIFT_TO_UTC: _DM_SHIFT_TO_UTC_TYPE = 128
68
+ DM_UNIX_TIME: _DM_UNIX_TIME_TYPE = 2
69
+ IM_ANY_ITERABLE: _IM_ANY_ITERABLE_TYPE = 0
70
+ IM_ONLY_LISTS: _IM_ONLY_LISTS_TYPE = 1
71
+ MM_ANY_MAPPING: _MM_ANY_MAPPING_TYPE = 0
72
+ MM_COERCE_KEYS_TO_STRINGS: _MM_COERCE_KEYS_TO_STRINGS_TYPE = 2
73
+ MM_ONLY_DICTS: _MM_ONLY_DICTS_TYPE = 1
74
+ MM_SKIP_NON_STRING_KEYS: _MM_SKIP_NON_STRING_KEYS_TYPE = 4
75
+ MM_SORT_KEYS: _MM_SORT_KEYS_TYPE = 8
76
+ NM_DECIMAL: _NM_DECIMAL_TYPE = 2
77
+ NM_NAN: _NM_NAN_TYPE = 1
78
+ NM_NATIVE: _NM_NATIVE_TYPE = 4
79
+ NM_NONE: _NM_NONE_TYPE = 0
80
+ PM_COMMENTS: _PM_COMMENTS_TYPE = 1
81
+ PM_NONE: _PM_NONE_TYPE = 0
82
+ PM_TRAILING_COMMAS: _PM_TRAILING_COMMAS_TYPE = 2
83
+ UM_CANONICAL: _UM_CANONICAL_TYPE = 1
84
+ UM_HEX: _UM_HEX_TYPE = 2
85
+ UM_NONE: _UM_NONE_TYPE = 0
86
+ WM_COMPACT: _WM_COMPACT_TYPE = 0
87
+ WM_PRETTY: _WM_PRETTY_TYPE = 1
88
+ WM_SINGLE_LINE_ARRAY: _WM_SINGLE_LINE_ARRAY_TYPE = 2
89
+
90
+
91
+ # Mode types
92
+ _NumberMode = int
93
+ _DatetimeMode = int
94
+ _UUIDMode = t.Literal[_UM_CANONICAL_TYPE, _UM_HEX_TYPE, _UM_NONE_TYPE]
95
+ _ParseMode = int
96
+ _WriteMode = t.Literal[_WM_COMPACT_TYPE, _WM_PRETTY_TYPE, _WM_SINGLE_LINE_ARRAY_TYPE]
97
+ _BytesMode = t.Literal[_BM_NONE_TYPE, _BM_UTF8_TYPE]
98
+ _IterableMode = t.Literal[_IM_ANY_ITERABLE_TYPE, _IM_ONLY_LISTS_TYPE]
99
+ _MappingMode = int
100
+
101
+
102
+ # Functions
103
+ def dumps(
104
+ obj: t.Any,
105
+ *,
106
+ skipkeys: t.Optional[bool] = False,
107
+ ensure_ascii: t.Optional[bool] = True,
108
+ write_mode: t.Optional[_WriteMode] = WM_COMPACT,
109
+ indent: t.Optional[t.Union[int, str]] = 4,
110
+ default: t.Optional[t.Callable[[t.Any], _JSONType]] = None,
111
+ sort_keys: t.Optional[bool] = False,
112
+ number_mode: t.Optional[_NumberMode] = NM_NAN,
113
+ datetime_mode: t.Optional[_DatetimeMode] = DM_NONE,
114
+ uuid_mode: t.Optional[_UUIDMode] = UM_NONE,
115
+ bytes_mode: t.Optional[_BytesMode] = BM_UTF8,
116
+ iterable_mode: t.Optional[_IterableMode] = IM_ANY_ITERABLE,
117
+ mapping_mode: t.Optional[_MappingMode] = MM_ANY_MAPPING,
118
+ allow_nan: t.Optional[bool] = True,
119
+ ) -> str: ...
120
+ def dump(
121
+ obj: t.Any,
122
+ stream: t.IO,
123
+ *,
124
+ skipkeys: t.Optional[bool] = False,
125
+ ensure_ascii: t.Optional[bool] = True,
126
+ write_mode: t.Optional[_WriteMode] = WM_COMPACT,
127
+ indent: t.Optional[t.Union[int, str]] = 4,
128
+ default: t.Optional[t.Callable[[t.Any], _JSONType]] = None,
129
+ sort_keys: t.Optional[bool] = False,
130
+ number_mode: t.Optional[_NumberMode] = NM_NAN,
131
+ datetime_mode: t.Optional[_DatetimeMode] = DM_NONE,
132
+ uuid_mode: t.Optional[_UUIDMode] = UM_NONE,
133
+ bytes_mode: t.Optional[_BytesMode] = BM_UTF8,
134
+ iterable_mode: t.Optional[_IterableMode] = IM_ANY_ITERABLE,
135
+ mapping_mode: t.Optional[_MappingMode] = MM_ANY_MAPPING,
136
+ chunk_size: t.Optional[int] = 65536,
137
+ allow_nan: t.Optional[bool] = True,
138
+ ) -> None: ...
139
+ def load(
140
+ stream: t.IO,
141
+ *,
142
+ object_hook: t.Optional[t.Callable[[t.Dict[str, t.Any]], t.Any]] = None,
143
+ number_mode: t.Optional[_NumberMode] = NM_NAN,
144
+ datetime_mode: t.Optional[_DatetimeMode] = DM_NONE,
145
+ uuid_mode: t.Optional[_UUIDMode] = UM_NONE,
146
+ parse_mode: t.Optional[_ParseMode] = PM_NONE,
147
+ chunk_size: t.Optional[int] = 65536,
148
+ allow_nan: t.Optional[bool] = True,
149
+ ) -> t.Any: ...
150
+ def loads(
151
+ string: t.Union[str, bytes, bytearray],
152
+ *,
153
+ object_hook: t.Optional[t.Callable[[t.Dict[str, t.Any]], t.Any]] = None,
154
+ number_mode: t.Optional[_NumberMode] = NM_NAN,
155
+ datetime_mode: t.Optional[_DatetimeMode] = DM_NONE,
156
+ uuid_mode: t.Optional[_UUIDMode] = UM_NONE,
157
+ parse_mode: t.Optional[_ParseMode] = PM_NONE,
158
+ allow_nan: t.Optional[bool] = True,
159
+ ) -> t.Any: ...
160
+
161
+
162
+ # Classes
163
+ class JSONDecodeError(Exception): ...
164
+ class ValidationError(Exception): ...
165
+
166
+
167
+ class Decoder:
168
+ datetime_mode: _DatetimeMode
169
+ number_mode: _NumberMode
170
+ parse_mode: _ParseMode
171
+ uuid_mode: _UUIDMode
172
+
173
+ def __init__(
174
+ self,
175
+ datetime_mode: t.Optional[_DatetimeMode] = DM_NONE,
176
+ number_mode: t.Optional[_NumberMode] = NM_NAN,
177
+ parse_mode: t.Optional[_ParseMode] = PM_NONE,
178
+ uuid_mode: t.Optional[_UUIDMode] = UM_NONE,
179
+ ) -> None: ...
180
+ def __call__(
181
+ self,
182
+ json: t.Union[str, bytes, bytearray, t.IO],
183
+ chunk_size: t.Optional[int] = 65536,
184
+ ) -> t.Any: ...
185
+
186
+
187
+ class Encoder:
188
+ bytes_mode: _BytesMode
189
+ datetime_mode: _DatetimeMode
190
+ ensure_ascii: bool
191
+ indent_char: str
192
+ indent_count: int
193
+ iterable_mode: _IterableMode
194
+ mapping_mode: _MappingMode
195
+ number_mode: _NumberMode
196
+ skip_invalid_keys: bool
197
+ sort_keys: bool
198
+ uuid_mode: _UUIDMode
199
+ write_mode: _WriteMode
200
+
201
+ def __init__(
202
+ self,
203
+ skip_invalid_keys: t.Optional[bool] = False,
204
+ ensure_ascii: t.Optional[bool] = True,
205
+ write_mode: t.Optional[_WriteMode] = WM_COMPACT,
206
+ indent: t.Optional[t.Union[int, str]] = 4,
207
+ sort_keys: t.Optional[bool] = False,
208
+ number_mode: t.Optional[_NumberMode] = NM_NAN,
209
+ datetime_mode: t.Optional[_DatetimeMode] = DM_NONE,
210
+ uuid_mode: t.Optional[_UUIDMode] = UM_NONE,
211
+ bytes_mode: t.Optional[_BytesMode] = BM_UTF8,
212
+ iterable_mode: t.Optional[_IterableMode] = IM_ANY_ITERABLE,
213
+ mapping_mode: t.Optional[_MappingMode] = MM_ANY_MAPPING,
214
+ ) -> None: ...
215
+ def __call__(
216
+ self,
217
+ obj: t.Any,
218
+ stream: t.Optional[t.IO] = None,
219
+ chunk_size: t.Optional[int] = 65536,
220
+ ) -> t.Optional[str]: ...
221
+
222
+
223
+ @t.final
224
+ class RawJSON:
225
+ value: RawJSON
226
+ def __init__(self, value: str) -> None: ...
227
+
228
+
229
+ @t.final
230
+ class Validator:
231
+ def __init__(self, json_schema: t.Union[str, bytes, bytearray]) -> None: ...
232
+ def __call__(self, json: t.Union[str, bytes, bytearray]) -> None: ...
Binary file