File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ Using json.tool from the shell to validate and pretty-print::
102102 "json": "obj"
103103 }
104104 $ echo '{1.2:3.4}' | python -mjson.tool
105- Expecting property name enclosed in double quotes: line 1 column 1 (char 1)
105+ Expecting property name enclosed in double quotes: line 1 column 2 (char 1)
106106
107107.. highlight :: python3
108108
Original file line number Diff line number Diff line change 9797 "json": "obj"
9898 }
9999 $ echo '{ 1.2:3.4}' | python -m json.tool
100- Expecting property name enclosed in double quotes: line 1 column 2 (char 2)
100+ Expecting property name enclosed in double quotes: line 1 column 3 (char 2)
101101"""
102102__version__ = '2.0.9'
103103__all__ = [
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ def linecol(doc, pos):
3232 newline = '\n '
3333 lineno = doc .count (newline , 0 , pos ) + 1
3434 if lineno == 1 :
35- colno = pos
35+ colno = pos + 1
3636 else :
3737 colno = pos - doc .rindex (newline , 0 , pos )
3838 return lineno , colno
Original file line number Diff line number Diff line change 77 "json": "obj"
88 }
99 $ echo '{ 1.2:3.4}' | python -m json.tool
10- Expecting property name enclosed in double quotes: line 1 column 2 (char 2)
10+ Expecting property name enclosed in double quotes: line 1 column 3 (char 2)
1111
1212"""
1313import sys
Original file line number Diff line number Diff line change @@ -181,6 +181,9 @@ Core and Builtins
181181Library
182182-------
183183
184+ - Issue #17225: JSON decoder now counts columns in the first line starting
185+ with 1, as in other lines.
186+
184187- Issue #13700: Fix byte/string handling in imaplib authentication when an
185188 authobject is specified.
186189
You can’t perform that action at this time.
0 commit comments