如何在 JSON 中转义双引号 [英] How to escape double quotes in JSON
本文介绍了如何在 JSON 中转义双引号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图显示双引号,但它显示了反斜杠之一:
I'm trying to show double quotes but it shows one of the backslashes:
"maingame": {
"day1": {
"text1": "Tag 1",
"text2": "Heute startet unsere Rundreise \"Example text\". Jeden Tag wird ein neues Reiseziel angesteuert bis wir.</strong> "
}
}
在 html 中呈现时,它显示为 "Example text"
.正确的做法是什么?
When rendering in the html it shows as "Example text"
. What is the correct way?
推荐答案
试试这个:
"maingame": {
"day1": {
"text1": "Tag 1",
"text2": "Heute startet unsere Rundreise " Example text". Jeden Tag wird ein neues Reiseziel angesteuert bis wir.</strong> "
}
}
(引号前只有一个反斜杠 ()).
(just one backslash () in front of quotes).
这篇关于如何在 JSON 中转义双引号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文