【发布时间】:2017-04-11 12:14:18
【问题描述】:
我很确定这纯粹是一个语法问题,但我正在尝试为拥有 2 个分支机构且每个分支机构有 2 个主要部门的客户设置一些 JSON-LD 格式的 Schema.org。
我遇到的问题是每个部门的开放时间。这是我的代码:
{
"@context": {
"@vocab": "http://schema.org/"
},
"@graph": [{
"@id": "http://example.com",
"@type": "Organization",
"name": "Group Name",
"url": "http://example.com",
"logo": "http://example.com/images/logo.png",
"image": "http://example.com/images/logo.png",
"description": "Some information about the customer",
"currenciesAccepted": "GBP",
"sameAs": ["https://www.facebook.com/[customers facebook page/"]
},
{
"@type": "AutoDealer",
"parentOrganization": {
"name": "Group Name"
},
"name": "Banch 1",
"address": {
"@type": "PostalAddress",
"streetAddress": "street",
"addressLocality": "locality",
"addressRegion": "region",
"postalCode": "post code",
"telephone": "phone number"
},
"department": [{
"name": "Sales Department",
"openingHours": ["Mo-Fr 9:00 - 19:00", "Sa 9:00 - 17:00"]
},
{
"name": "Service Department",
"openingHours": ["Mo-Fr 7:30 - 18:00", "Sa 9:00 - 12:00"]
}
],
"hasmap": "google map url"
},
{
"@type": "AutoDealer",
"parentOrganization": {
"name": "Group Name"
},
"name": "Branch 2",
"address": {
"@type": "PostalAddress",
"streetAddress": "street",
"addressLocality": "locality",
"addressRegion": "region",
"postalCode": "post code",
"telephone": "phone number"
},
"department": [{
"name": "Sales Department",
"openingHours": ["Mo-Fr 9:00 - 19:00", "Sa 9:00 - 17:00"]
},
{
"name": "Service Department",
"openingHours": ["Mo-Fr 7:30 - 18:00", "Sa 9:00 - 12:00"]
}
],
"hasmap": "Google map url"
}
]
}
当我在谷歌的结构化数据测试工具上测试它时,我得到了错误:
Google 无法识别
Organization类型的对象的属性openingHours。
【问题讨论】:
-
这已经很晚了,但是 LocalBusiness 标记有一个“branchCode”字段
标签: schema.org json-ld