Closed liangjs closed 5 months ago
Describe the bug Wrong result when parsing json with trailing texts.
To Reproduce The following code should return {'a': '', 'b': [{'c': 1}]}
{'a': '', 'b': [{'c': 1}]}
json_repair.loads("""{"a": "", "b": [ { "c": 1} ]}```""") # This is parsed to {'a': ', "b'} json_repair.loads("""{ "a": "", "b": [ { "c": 1} ] \n}```""") # This will raise exception TypeError: unhashable type: 'list'
It seems the TypeError exception is not related to the trailing texts, considering:
json_repair.loads("""{ "a": "", "b": [ { "c": "1as\\\\df"} ] }""", skip_json_loads=True)
Describe the bug Wrong result when parsing json with trailing texts.
To Reproduce The following code should return
{'a': '', 'b': [{'c': 1}]}