저는 이것이 순전히 구문 문제라고 확신합니다. 그러나 나는 Schema.org를 JSON-LD 형식으로 설정하려고합니다. 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"
}
]
}
내가 구글의 구조화 된 데이터 테스트 도구에서 테스트 할 때, 나는 오류 얻을 :
The property
openingHours
is not recognized by Google for an object of typeOrganization
.
브릴리언트. 당신의 도움을 주셔서 감사합니다. 이제는 의미가 있습니다. –
@ Strontium_99 : 천만에요. 그런데'@graph'를 사용하고 자식 조직에서 부모로의 관계를'name' 속성을 통해서만 암시 적으로 만드는 대신 최상위 항목으로'Organization'만을 제공하고, 'subOrganization'] (http://schema.org/subOrganization) 속성을 사용하여 두 개의 'AutoDealer'항목에 연결합니다. 어떤 이유로 든 가능하지 않다면'@ id '를 사용하여 각 노드에 식별자를 부여하고 동일한 조직과 이야기하고 있다는 것을 전달할 수 있습니다. – unor
그것은 훨씬 더 의미가 있습니다. 나는 인터넷에있는 글에서 내 글을 하나로 묶어 버릴 것이므로, 불필요한 @graph. 그러나 당신의 제안은 더 논리적이라고 생각합니다. 감사합니다 Unor. 너는 별이야. –