schema.org - 网站连结搜寻框JSON-LD在Google结构化资料测试工具上显示错误

标签 schema.org google-rich-snippets json-ld

我在自己的网站上实现了Google的Sitelinks Search Box。运行得很好。但是今天我再次对Google Structured Data Testing Tool轻笑,出了点问题。现在,我遇到了以下错误:

Google Structured Data Testing Tool: 2 Errors for WebSite



我的实现是:

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "WebSite",
  "url": "https://www.saatler.com/",
  "potentialAction": {
    "@type": "SearchAction",
    "target": "https://www.saatler.com/arama?ara={search_term_string}",
    "query-input":"required name=search_term_string"
  }
}
</script>

当我检查the JSON-LD playground上的JSON时,一切看起来都很好。我没有更改网站上的任何内容。 Google在这个问题上错了吗?还是Schema.org结构发生了变化?我该怎么做才能解决这两个问题?

最佳答案

我注意到,即使在线documentation上的示例也收到与您收到的相同的错误。当我改变

"@context": "http://schema.org"


"@context": "http://schema.org/true"

错误消失了。希望这可以帮助。



<script type="application/ld+json">
{
  "@context": "http://schema.org/true",
  "@type": "WebSite",
  "url": "https://www.saatler.com/",
  "potentialAction": {
    "@type": "SearchAction",
    "target": "https://www.saatler.com/arama?ara={search_term_string}",
    "query-input":"required name=search_term_string"
  }
}
</script>

关于schema.org - 网站连结搜寻框JSON-LD在Google结构化资料测试工具上显示错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30780247/

相关文章:

url - Rich Snippets - 搜索中的站点名称(规范网站 URL)

json-ld - 在 JSON-LD 中,是否可以为属性值定义 URI 映射?

html - 一个页面中的多个 JSON-LD 标签组

html - 电话号码上未拾取结构化数据

html - 多语言网站的 Google 搜索结果中的网站名称

javascript - 正确部署 Google Rich Card 的结构化数据

JSON 到 JSON LD,对原始 JSON 的更改最少(JSON-LD 上下文中的所有更改)

json - 如何在 JSON-LD 中返回 SPARQL 结果?

Schema.org - JSON-LD - 放在哪里?

javascript - 添加 schema.org 视频标记以使用 Javascript 嵌入