diff options
author | Bob Ippolito <bob@redivi.com> | 2023-04-04 10:59:13 -0700 |
---|---|---|
committer | Bob Ippolito <bob@redivi.com> | 2023-04-04 10:59:13 -0700 |
commit | 59dac4e82cd6766fc31a9389d573d732580eaab5 (patch) | |
tree | 2cba0cbde6419fa11c6111d82f64b989c46455ec /index.rst | |
parent | 1e495c1199f56c2e8e7931f20bda7481842e18ff (diff) | |
download | simplejson-59dac4e82cd6766fc31a9389d573d732580eaab5.tar.gz |
SJ-PT-23-03: Backport integer string length limitation to limit quadratic parsing
Diffstat (limited to 'index.rst')
-rw-r--r-- | index.rst | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -412,6 +412,13 @@ Basic Usage be used to use another datatype or parser for JSON integers (e.g. :class:`float`). + .. versionchanged:: 3.19.0 + The integer to string conversion length limitation introduced in + Python 3.11 has been backported. An attempt to parse an integer + with more than 4300 digits will result in an exception unless a + suitable alternative parser is specified + (e.g. :class:`decimal.Decimal`) + *parse_constant*, if specified, will be called with one of the following strings: ``'-Infinity'``, ``'Infinity'``, ``'NaN'``. This can be used to raise an exception if invalid JSON numbers are encountered. @@ -502,6 +509,13 @@ Encoders and decoders be used to use another datatype or parser for JSON integers (e.g. :class:`float`). + .. versionchanged:: 3.19.0 + The integer to string conversion length limitation introduced in + Python 3.11 has been backported. An attempt to parse an integer + with more than 4300 digits will result in an exception unless a + suitable alternative parser is specified + (e.g. :class:`decimal.Decimal`) + *parse_constant*, if specified, will be called with one of the following strings: ``'-Infinity'``, ``'Infinity'``, ``'NaN'``. This can be used to raise an exception if invalid JSON numbers are encountered. |