【发布时间】:2019-10-05 16:09:51
【问题描述】:
我有很多无效的 JSON 文件。
这是无效 JSON 文件的 sn-p。
[
{
'name':'Arden',
'born':'1973-12-22',
'orientation':'Heterosexual',
'purpose':'Friendship',
'tags':'cooking,swimming,adventure,drawing',
'country':'United Kingdom::Edinburgh',
'about':'I often read (and enjoy!) things that are completely opposed to everything I believe. I've enjoyed.'
},
{
'name':'Sisera',
'born':'1962-01-25',
'orientation':'Homosexual',
'purpose':'Flirt',
'tags':'reading,fishing,tennis,theater',
'country':'United States::Fairfield',
'about':'I'm OCD about shoes being placed side-by-side. I don't like them together by the door.'
}
]
如何将此单引号替换为双引号? PHP中有没有在线工具或解决方案?
我想要的是:
[
{
"name":"Arden",
"born":"1973-12-22",
"orientation":"Heterosexual",
"purpose":"Friendship",
"tags":"cooking,swimming,adventure,drawing",
"country":"United Kingdom::Edinburgh",
"about":"I often read (and enjoy!) things that are completely opposed to everything I believe. I\'ve enjoyed."
},
{
"name":"Sisera",
"born":"1962-01-25",
"orientation":"Homosexual",
"purpose":"Flirt",
"tags":"reading,fishing,tennis,theater",
"country":"United States::Fairfield",
"about":"I\'m OCD about shoes being placed side-by-side. I don\'t like them together by the door."
}
]
提前致谢。
【问题讨论】:
标签: php json single-quotes