s = """{'message': " AwContents.java:599:30: ',' is not followed by whitespace.\n android", 'a': 'tango'"""
1.直接 json.loads(s),报错 json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)
2.替换引号 s = s.replace("'", '"'),报错 json.decoder.JSONDecodeError: Invalid control character at: line 1 column 74 (char 73)
各位这个要怎么处理啊?因为这个要在 server 端用,不能使用 eval()
1.直接 json.loads(s),报错 json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)
2.替换引号 s = s.replace("'", '"'),报错 json.decoder.JSONDecodeError: Invalid control character at: line 1 column 74 (char 73)
各位这个要怎么处理啊?因为这个要在 server 端用,不能使用 eval()