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> "
    }
}

When rendering in the html it shows as \"Example text\". What is the correct way?

推荐答案

Try this:

"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相关问答推荐

Vega图表计数聚合如果数据值为空数组则不显示任何内容,如何解决此问题?

当有2个嵌套数组时展平复杂的JSON

通过在织女星简化图上裁剪来显示文本

将JSON数组组织到菜单中

JOLT转换以根据条件删除json对象

在 PowerShell 中通过 aws cli 创建 cloudwatch alert 时出现字符串解析错误

如何使用 JOLT 将带有列表的 JSON 项目取消列出为多个项目?

jq:来自嵌套 JSON 的映射

使用带有逗号的字段名称构建 struct

JQ 中的样本标准偏差

Powershell 无法从名为 count 的键中获取价值

如何使用 CORS 实现 JavaScript Google Places API 请求

如何从Typescript 中的json响应中获取日期对象

Jackson 中的 readValue 和 readTree:何时使用哪个?

十六进制格式可以与 JSON 文件一起使用吗?如果是这样,怎么做?

如何在 Perl 中将简单的哈希转换为 json?

如何在已声明的 JSON 对象中添加键值对

将 json 转换为 C# 数组?

SCRIPT5009:JSON未定义

如何对 Javascript 对象进行排序,或将其转换为数组?