ast.literal_eval(jsonStr) json格式字符串转dict 2种方式 json.loads(jsonStr, encoding='utf-8')import ast ast.literal_eval(jsonStr)