summaryrefslogtreecommitdiff
path: root/simplejson/tests
Commit message (Collapse)AuthorAgeFilesLines
* Additional security hardening improvements:Bob Ippolito2023-04-051-2/+5
| | | | | | | | * Remove unused namedtuple_as_object and tuple_as_array arguments from simplejson.load (SJ-PT-23-102) * Remove vestigial _one_shot code from iterencode (SJ-PT-23-103) * Change default of allow_nan from True to False and add allow_nan to decoder (SJ-PT-23-107)
* SJ-PT-23-100: Fix inconsistencies in error messages between C and Python ↵Bob Ippolito2023-04-041-1/+3
| | | | implementations
* SJ-PT-23-03: Backport integer string length limitation to limit quadratic ↵Bob Ippolito2023-04-041-0/+8
| | | | parsing
* SJ-PT-23-01: Fix invalid handling of unicode escape sequences in Python decoderBob Ippolito2023-04-041-1/+3
|
* Implement tests and fallback implementation of #301Bob Ippolito2022-11-141-2/+27
|
* Add the unit testKishin Yagami2022-04-211-0/+2
|
* oops, a missing word made it into the commit.Gregory P. Smith2021-08-231-1/+1
|
* Move the PyDict_Check after the _asdict call.Gregory P. Smith [Google LLC]2021-08-201-0/+27
| | | | Add a unittest.
* Replace travis and appveyor with github actionsBob Ippolito2021-07-092-19/+43
|
* add testBenjamin Peterson2018-06-261-0/+2
|
* Merge branch 'master' into str-decodestr-decodeBob Ippolito2018-04-251-1/+7
|\
| * Support builds without cStringIO.cStringIOSerhiy Storchaka2018-04-251-1/+7
| | | | | | | | | | The cStringIO module is optional. Fall back to StringIO if it is not available.
* | Bypass the decode() method in bytes subclasses.Serhiy Storchaka2018-04-252-2/+53
|/ | | | | The Python and the C implementations produce different results due to using the decode() method.
* Allow to disable serializing bytes by default in Python 3.bytes-encodingSerhiy Storchaka2018-04-251-0/+76
| | | | | If encoding is None, then bytes objects will be passed to the default() method instead of transforming into unicode.
* Merge pull request #215 from simplejson/compatBob Ippolito2018-04-244-8/+8
|\ | | | | Simplify the compatibility code.
| * Simplify compatibility code.compatSerhiy Storchaka2018-04-244-8/+8
| | | | | | | | | | Since minimal supported Python 3 version is 3.3, the u() helper no longer needed.
* | Fix tests in Python 2.5.tempfile-py25Serhiy Storchaka2018-04-241-9/+18
|/ | | | NamedTemporaryFile supports the "delete" argument only since 2.6.
* Avoid escaping U+2028 and U+2029 without ensure_asciiRichard van der Hoff2018-03-292-2/+11
| | | | | There is no need to escape U+2028 and U+2029 when ensure_ascii is false, and doing so makes us inconsistent with the standard JSON library.
* Avoid copying strings when encodingRichard van der Hoff2018-03-271-0/+5
| | | | | | | d782561 introduced a performance regression which means that every string is copied during serialisation, when ensure_ascii is False. This should fix it.
* Ensure that encoding text subtypes is consistent with or without speedups. ↵Bob Ippolito2017-11-231-1/+13
| | | | Fixes #185
* Merge pull request #191 from simplejson/type-error-messagesBob Ippolito2017-11-231-1/+18
|\ | | | | Make TypeError messages contain type name instead of a repr.
| * Add tests.type-error-messagesSerhiy Storchaka2017-11-231-1/+18
| |
* | Workarounds for NamedTemporaryFile issues with Windows for tool testsBob Ippolito2017-11-231-13/+21
| |
* | Fix a test.bpo-31505Serhiy Storchaka2017-11-061-3/+1
| |
* | bpo-31505: Fix an assertion failure in json, in case _json.make_encoder() ↵Serhiy Storchaka2017-11-061-0/+26
|/ | | | | | received a bad encoder() argument. Original patch by Oren Milman.
* Fix #173 with item_sort_key and add auto-discovery to test suiteBob Ippolito2017-06-192-31/+14
|
* Fix a crash wish unencodable encoding in the encoder.unencodable-encoder-encodingSerhiy Storchaka2017-05-211-1/+9
| | | | | JSONEncoder.encode() crashed in Python 3 when encoded bytes keys if the encoding was not encodable to utf-8 (contained surrogates).
* Make test_speedups compatible with Python 2.5 and 2.6.Serhiy Storchaka2017-05-211-37/+25
|
* Make test_speedups compatible with Python 2.5.Serhiy Storchaka2017-05-211-0/+2
|
* Fix argument checking errors in _speedups.c.Serhiy Storchaka2017-05-121-1/+54
| | | | | | | Always check PyObject_IsTrue() for error. Also fix integer overflow in the int_as_string_bitcount argument. Fixes #167.
* Bump version, update changelog, fix issues identified in code review of #143Bob Ippolito2016-10-282-0/+18
|
* Merge branch 'raw_json' of https://github.com/lamflam/simplejson into ↵Bob Ippolito2016-10-281-0/+30
|\ | | | | | | lamflam-raw_json
| * Add support for preprocessed JSON strings (with optimizations) in encoderKevin LaFlamme2016-09-011-0/+30
| | | | | | | | In some situations, you may have a large python dictionary you need to JSONify but one of the values inside the dict is already a JSON string. This is common when pulling an object from a database, for example, where one of the fields is a JSON blob/string. Previously you would have to deserialize and then reserialize that string just to serialize the high level object, but obviously this is unnecessarily slow. This changes adds a method/type that can be used to wrap a str and tell the serializer to just pass it through instead.
* | Fixes #144. Workaround for bad behavior in string subclasses.Bob Ippolito2016-10-212-0/+17
|/
* Fix issue with iterable_as_array and indent option, closes #128v3.8.1Bob Ippolito2015-10-272-17/+18
|
* Merge branch 'master' into iterable_as_array-gh1Nick Babcock2015-07-1027-206/+1060
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: CHANGES.txt conf.py index.rst setup.py simplejson/__init__.py simplejson/_speedups.c simplejson/encoder.py simplejson/tests/test_tuple.py
| * no longer trust custom repr for int/long/float subclasses #118v3.7.0Bob Ippolito2015-05-182-0/+38
| |
| * failing test for #106Bob Ippolito2014-09-291-0/+9
| |
| * generalize BOM stripping to any use of raw_decodeBob Ippolito2014-07-212-11/+7
| |
| * strip utf-8 bom.Ryo Takahashi2014-07-212-0/+12
| |
| * Fix lower bound checking in scan_once / raw_decode API #98v3.5.3Bob Ippolito2014-06-241-0/+11
| |
| * consistently reject int_as_string_bitcount <= 0 #96v3.5.1Bob Ippolito2014-05-222-0/+7
| |
| * Allocate int_as_string bounds once per encoderColin Deasy2014-05-201-1/+2
| |
| * Adding `int_as_string_bitcount` optionColin Deasy2014-05-143-42/+136
| |
| * fix tests to run on Python 3.4Bob Ippolito2014-04-301-37/+45
| |
| * improve Python 3.3 compat #87, bump to 3.3.3v3.3.3Bob Ippolito2014-02-141-4/+4
| |
| * fix pickle breakage with JSONDecodeErrorIdan Kamara2013-10-051-1/+17
| | | | | | | | | | pickle doesn't behave correctly with custom Exceptions, we workaround the issue by explicitly defining how to pickle JSONDecodeError.
| * pass-through in decoder for lone surrogates #62v3.3.0surrogate-62baserock/morphBob Ippolito2013-05-072-19/+55
| |
| * ignore_nan #63ecma-262-63Bob Ippolito2013-05-011-1/+9
| |
| * update CHANGES and testsfor_json-69Bob Ippolito2013-05-012-75/+47
| |