cpython: 361ba6d4b7c9 (original) (raw)
Mercurial > cpython
changeset 82302:361ba6d4b7c9 3.3
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:21:21 +0200 |
parents | a4e348c4b5d3(current diff)36220cf535aa(diff) |
children | 69f793cc34fc 576d2c885eb6 |
files | Lib/json/decoder.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 @@ -102,7 +102,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 @@ -97,7 +97,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 @@ -32,7 +32,7 @@ def linecol(doc, pos): newline = '\n' lineno = doc.count(newline, 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 @@ -181,6 +181,9 @@ Core and Builtins Library ------- +- Issue #17225: JSON decoder now counts columns in the first line starting