Closed
Description
When there is an error in a json5 file, the error message seems to always point to the first element in the json5 file.
For example:
import json5
JSON5 = """
{
version: "1.0",
author: "John Smith",
people : [
"Monty",
"Python"foo
]
}
"""
json5.loads(JSON5)
Gives the error:
Traceback (most recent call last):
File "C:/Users/Admin/surfdrive/client/stuff/tests/testjson5.py", line 12, in <module>
json5.loads(JSON5)
File "C:\Users\Admin\Anaconda3\envs\python38\lib\site-packages\json5\lib.py", line 82, in loads
raise ValueError(err)
ValueError: <string>:3 Unexpected "v" at column 5
I would expect the error: ValueError: <string>:7 Unexpected "f" at column 16.
json5 version: 0.9.6
OS: Windows 10
Python: 3.8.8
Metadata
Metadata
Assignees
Labels
No labels