json 属性值用双引号
思路: 将单引号转换为 @#$
将双引号转换为^^&
def json_quote(string): singlequote = "@#$" doublequote = "^^&" string = str(string).replace("'",singlequote) string = str(string).replace('"',doublequote) string = str(string).replace(doublequote,"'") string = str(string).replace(singlequote,'"') return string