你可以使用纯Python执行此操作:
import jsonlist = [1, 2, (3, 4)] # Note that the 3rd element is a tuple (3, 4)json.dumps(list) # '[1, 2, [3, 4]]'

你可以使用纯Python执行此操作:
import jsonlist = [1, 2, (3, 4)] # Note that the 3rd element is a tuple (3, 4)json.dumps(list) # '[1, 2, [3, 4]]'