In python I have a dictionary that maps tuples to a list of tuples. e.g.
{(1,2): [(2,3),(1,7)]}
I want to be able to encode this data use it with javascript, so I looked into json but it appears keys must be strings so my tuple does not work as a key.
处理此问题的最佳方式是将其编码为"1,2",然后将其解析为我想要在javascript上使用的内容吗?或者有没有更聪明的方法来处理这件事.