JS - JSON 单双引号互换
时间:2020-05-13 00:25:27
收藏:0
阅读:126
1. 双引号转换为单引号
JSON.stringify(data).replace(/\"/g,"‘");
2. 单引号转换为双引号
data.replace(/‘/g, ‘"‘);
原文出处 : https://blog.csdn.net/weixin_33845881/article/details/85861807
原文:https://www.cnblogs.com/500m/p/12879617.html
评论(0)