json - JSON格式,有效的JSON显示语法错误

标签 json syntax-error code-formatting stamplay

因此,我正在尝试部署我的简单stamplay Web应用程序,但出现错误:

stamplay.json中的语法错误:意外 token {

我尝试通过几种失败的格式尝试进行故障排除。我确保也没有多余的元数据或特殊字符。

尽管这可能是我犯的一个愚蠢的错误,但经过一个多小时的搜索,我仍然找不到解决方法,我们将不胜感激。

 {
     { "appId": "name",
      "apiKey": "apikeyhere",
      "public": "./",
      "ignore": [
        "stamplay.json",
        "**/.*",
        "**/node_modules/**"
      ] }
     { "headers": [
          {
            "source" : "**/*.@(jpg|gif|png|mp3|mp4)",
            "headers" : [
              {
                "key" : "Cache-Control",
                "value" : "max-age=7200"
              }
            ]
          },
            {
              "source" : "**/*.@(html|css|js|php)",
              "headers" : [
                {
                  "key" : "expires",
                  "value" : "1y"
                }
              ]
            }
          ]
      }
    }

最佳答案

这是您要做什么?

{
  "appId": "name",
  "apiKey": "apikeyhere",
  "public": "./",
  "ignore": [
    "stamplay.json",
    "**/.*",
    "**/node_modules/**"
  ],
  "headers": [
    {
      "source": "**/*.@(html|css|js|php)",
      "headers": [
        {
          "key": "expires",
          "value": "1y"
        }
      ]
    },
    {
      "source": "**/*.@(html|css|js|php)",
      "headers": [
        {
          "key": "expires",
          "value": "1y"
        }
      ]
    }
  ]
}

关于json - JSON格式,有效的JSON显示语法错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37601398/

相关文章:

php - 如何使用json检索数据到mysql android

javascript - 向 javascript 函数添加属性

c# - 不能使用公共(public)访问修饰符

c - C 中预处理器语句的缩进

java.lang.NoSuchFieldError : FAIL_ON_SYMBOL_HASH_OVERFLOW] in elasticsearch Watcher plugin 错误

JavaScript 水平旋转器

awk - 我的第一个脚本中的语法错误。(最小,最大)

excel - worksheet_change VBA 代码中具有不同宏调用的多个目标

c++ - 是否有任何工具可以标准化 C++ 代码的格式?

java - 将 Intellij IDEA 代码格式化规则导出到 Eclipse