【发布时间】:2017-03-09 19:39:03
【问题描述】:
当我复制/粘贴 JSON-LD example from Google Documentation(下面的代码-sn-p)时,Structured Data Testing Tool 中出现错误:
http://www.your-company-site.com(提供的所有值http://www.example.com/必须具有相同的域。)
为什么 Google 自己的文档示例会出错?
Google 文档中的代码 sn-p:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Organization",
"url": "http://www.your-company-site.com",
"contactPoint": [{
"@type": "ContactPoint",
"telephone": "+1-401-555-1212",
"contactType": "customer service"
}]
}
</script>
【问题讨论】:
-
奇怪,一个月前的代码居然没有报错。
-
单行文档将使测试仪更加实用!
-
下面的答案和 cmets 似乎包含正确的信息。让我们添加一个已接受的答案并链接有关此主题的所有其他问题。
-
另一个仅供参考:显然这个“错误”只针对组织类型弹出;我没有收到网站实体的此错误
标签: url schema.org json-ld google-rich-snippets