with 1, as in other lines.
"json": "obj"
}
$ echo '{1.2:3.4}' | python -mjson.tool
- Expecting property name enclosed in double quotes: line 1 column 1 (char 1)
+ Expecting property name enclosed in double quotes: line 1 column 2 (char 1)
.. highlight:: python
"json": "obj"
}
$ echo '{ 1.2:3.4}' | python -m json.tool
- Expecting property name enclosed in double quotes: line 1 column 2 (char 2)
+ Expecting property name enclosed in double quotes: line 1 column 3 (char 2)
"""
__version__ = '2.0.9'
__all__ = [
def linecol(doc, pos):
lineno = doc.count('\n', 0, pos) + 1
if lineno == 1:
- colno = pos
+ colno = pos + 1
else:
colno = pos - doc.rindex('\n', 0, pos)
return lineno, colno
"json": "obj"
}
$ echo '{ 1.2:3.4}' | python -m json.tool
- Expecting property name enclosed in double quotes: line 1 column 2 (char 2)
+ Expecting property name enclosed in double quotes: line 1 column 3 (char 2)
"""
import sys
Library
-------
+- Issue #17225: JSON decoder now counts columns in the first line starting
+ with 1, as in other lines.
+
- Issue #7842: backported fix for py_compile.compile() syntax error handling.
- Issue #13153: Tkinter functions now raise TclError instead of ValueError when