cpython: ce583eb0bec2 (original) (raw)
Mercurial > cpython
changeset 82300:ce583eb0bec2 2.7
Issue #17225: JSON decoder now counts columns in the first line starting with 1, as in other lines. [#17225]
Serhiy Storchaka storchaka@gmail.com | |
---|---|
date | Thu, 21 Feb 2013 20:17:54 +0200 |
parents | 7a9ea3d08f51 |
children | 124237eb5de9 |
files | Doc/library/json.rst Lib/json/__init__.py Lib/json/decoder.py Lib/json/tool.py Misc/NEWS |
diffstat | 5 files changed, 7 insertions(+), 4 deletions(-)[+] [-] Doc/library/json.rst 2 Lib/json/__init__.py 2 Lib/json/decoder.py 2 Lib/json/tool.py 2 Misc/NEWS 3 |
line wrap: on
line diff
--- a/Doc/library/json.rst +++ b/Doc/library/json.rst @@ -103,7 +103,7 @@ Using json.tool from the shell to valida "json": "obj" } $ echo '{1.2:3.4}' | python -mjson.tool
--- a/Lib/json/init.py +++ b/Lib/json/init.py @@ -95,7 +95,7 @@ Using json.tool from the shell to valida "json": "obj" } $ echo '{ 1.2:3.4}' | python -m json.tool
--- a/Lib/json/decoder.py +++ b/Lib/json/decoder.py @@ -27,7 +27,7 @@ NaN, PosInf, NegInf = _floatconstants() def linecol(doc, pos): lineno = doc.count('\n', 0, pos) + 1 if lineno == 1:
colno = pos[](#l3.7)
--- a/Lib/json/tool.py +++ b/Lib/json/tool.py @@ -7,7 +7,7 @@ Usage:: "json": "obj" } $ echo '{ 1.2:3.4}' | python -m json.tool
--- a/Misc/NEWS +++ b/Misc/NEWS @@ -208,6 +208,9 @@ Core and Builtins Library ------- +- Issue #17225: JSON decoder now counts columns in the first line starting