【发布时间】:2023-02-09 07:18:45
【问题描述】:
search = """
[{"text":"Dolores Keane - \"Craigie Hills\" (1982)"}]
"""
print(loads(search)) # Returns Error
print(search.replace('"',"'")) # Turns all double quotes to single quotes, both the escaped and non escaped ones
这是我的问题:我只是不知道如何将这种字符串加载到 JSON 中。有小费吗?我尝试了十亿件事。尝试过 repr(search) 等,但没有任何效果。
错误: json.decoder.JSONDecodeError: Expecting ',' 分隔符:第 2 行第 28 列(字符 28)
【问题讨论】: