50 Commits

Author SHA1 Message Date
Serhiy Storchaka
58b6b985a0 Fixed the documentation of parse_constant argument in json.load().
parse_constant doesn't get called on 'null', 'true', 'false' since 3.1/2.7.
2016-11-12 22:47:16 +02:00
Martin Panter
ba5480b656 Issue #27993: Fix problems with the plural “objects” in docs and comments 2016-09-08 05:39:59 +00:00
Mark Dickinson
e6239a3ab3 Issue #27934: Use float.__repr__ instead of plain repr when JSON-encoding an instance of a float subclass. Thanks Eddie James. 2016-09-03 17:45:00 +01:00
Serhiy Storchaka
3626e5ef2a Issue #4945: Improved the documenting of boolean arguments in the json module.
Based on patch by Gabriel Genellina.
2016-06-30 13:58:58 +03:00
Ned Deily
6c5824aaa5 Issue #24540: fix typo in json.dumps docstring 2015-07-05 11:43:59 -07:00
Serhiy Storchaka
c7797dc748 Issue #19543: Emit deprecation warning for known non-text encodings.
Backported issues #19619: encode() and decode() methods and constructors
of str, unicode and bytearray classes now emit deprecation warning for known
non-text encodings when Python is ran with the -3 option.

Backported issues #20404: io.TextIOWrapper (and hence io.open()) now uses the
internal codec marking system added to emit deprecation warning for known non-text
encodings at stream construction time when Python is ran with the -3 option.
2015-05-31 20:21:00 +03:00
Benjamin Peterson
6c939cb6f6 in scan_once, prevent the reading of arbitrary memory when passed a negative index
Bug reported by Guido Vranken.
2014-04-13 22:10:38 -04:00
Serhiy Storchaka
7546220f06 Fixed JSON tests on wide build when ran from *.pyc files (issue #11489). 2013-12-01 17:30:55 +02:00
Serhiy Storchaka
dafda9b042 Issue #11489: JSON decoder now accepts lone surrogates. 2013-11-26 21:25:15 +02:00
R David Murray
35893b7994 #16057: Clarify why the base method default is called in custom encoders.
Original patch by Kushal Das.
2013-03-17 22:06:18 -04:00
Ezio Melotti
fda7a8ce78 #17368: Fix an off-by-one error in the Python JSON decoder that caused a failure while decoding empty object literals when object_pairs_hook was specified. 2013-03-13 01:49:57 +02:00
Serhiy Storchaka
49d4022d7d Issue #17225: JSON decoder now counts columns in the first line starting
with 1, as in other lines.
2013-02-21 20:17:54 +02:00
Ezio Melotti
43acbf1fd6 #16549: fix test failures on Windows. 2012-11-29 05:08:54 +02:00
Ezio Melotti
def6ee5979 #16476: Fix json.tool to avoid including trailing whitespace. 2012-11-29 02:22:49 +02:00
Ezio Melotti
d8feba904c #16549: Add tests for json.tools. Initial patch by Berker Peksag and Serhiy Storchaka. 2012-11-29 02:14:52 +02:00
Ezio Melotti
3a237ebcaa #16333: document a way to get rid of trailing whitespace when indent is used. 2012-11-29 00:22:30 +02:00
Ezio Melotti
282d331ec7 #16559: Add more tests for the json module. Patch by Serhiy Storchaka. 2012-11-26 19:22:58 +02:00
Antoine Pitrou
e9e35c3f6b Issue #16228: Fix a crash in the json module where a list changes size while it is being encoded.
Patch by Serhiy Storchaka.
2012-11-01 20:07:40 +01:00
Andrew Svetlov
41c25ba451 Issue #14570: Document json sort_keys parameter properly.
Patch by Chris Rebert.
2012-10-28 14:58:52 +02:00
Petri Lehtinen
f9e1f1128b #13769: Enhance docs for ensure_ascii semantics in JSON decoding functions 2012-09-01 07:29:06 +03:00
Antoine Pitrou
0e3a4c8058 Issue #15615: Add some tests for the json module's handling of invalid input data.
Patch by Kushal Das.
2012-08-18 20:51:05 +02:00
Antoine Pitrou
d9a5137742 Issue #5067: improve some json error messages.
Patch by Serhiy Storchaka.
2012-06-29 01:58:26 +02:00
Ezio Melotti
ed8cf7a543 #14875: Use float('inf') instead of float('1e66666') in the json module. 2012-05-21 17:46:55 -06:00
Benjamin Peterson
f093724845 don't rely on dict order 2012-02-20 23:06:22 -05:00
Amaury Forgeot d'Arc
dee76e627d Issue #13774: json: Fix a SystemError when a bogus encoding is passed to
json.loads().
2012-01-13 22:53:25 +01:00