File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ Using json.tool from the shell to validate and pretty-print::
103103 "json": "obj"
104104 }
105105 $ echo '{1.2:3.4}' | python -mjson.tool
106- Expecting property name enclosed in double quotes: line 1 column 1 (char 1)
106+ Expecting property name enclosed in double quotes: line 1 column 2 (char 1)
107107
108108.. highlight :: python
109109
Original file line number Diff line number Diff line change 9595 "json": "obj"
9696 }
9797 $ echo '{ 1.2:3.4}' | python -m json.tool
98- Expecting property name enclosed in double quotes: line 1 column 2 (char 2)
98+ Expecting property name enclosed in double quotes: line 1 column 3 (char 2)
9999"""
100100__version__ = '2.0.9'
101101__all__ = [
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ def _floatconstants():
2727def linecol (doc , pos ):
2828 lineno = doc .count ('\n ' , 0 , pos ) + 1
2929 if lineno == 1 :
30- colno = pos
30+ colno = pos + 1
3131 else :
3232 colno = pos - doc .rindex ('\n ' , 0 , pos )
3333 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 @@ -208,6 +208,9 @@ Core and Builtins
208208Library
209209-------
210210
211+ - Issue #17225: JSON decoder now counts columns in the first line starting
212+ with 1, as in other lines.
213+
211214- Issue #7842: backported fix for py_compile.compile() syntax error handling.
212215
213216- Issue #13153: Tkinter functions now raise TclError instead of ValueError when
You can’t perform that action at this time.
0 commit comments