我有一个bytes_start包含列表字符串的字节对象,我想将其转换为 Python 对象。
bytes_start = b'"[{\\"method\\": \\"NULLABLE\\", \\"title\\": \\"Customer\\", \\"type\\": \\"STRING\\"}, {\\"method\\": \\"NULLABLE\\", \\"title\\": \\"Vendor\\", \\"type\\": \\"INTEGER\\"}]"'
Run Code Online (Sandbox Code Playgroud)
我尝试使用new_bytes_start = json.dumps(bytes_start),但是没有用。如何使用 Python 3 获得以下结果?
new_bytes_start = [{"method": "NULLABLE", "title": "Customer", "type": "INTEGER"}, {"method": "NULLABLE", "title": "Vendor", "type": "FLOAT"}]
Run Code Online (Sandbox Code Playgroud)