根据Schema.org's Occupation
example 4,使用JSON-LD语法和Schema.org vocab,以下内容应有效,但无效。
{
"@context": "http://schema.org",
"@type": "Person",
"name": "Jane Smith",
"sameAs": "http://en.wikipedia.org/wiki/Jane_Smith",
"worksFor": {
"@type": "Organization",
"name": "McKinsey & Company",
"url" : "http://www.mckinsey.com"
},
"hasOccupation": [ {
"@type": "Role",
"hasOccupation": {
"name": "Management Consultant"
},
"startDate": "2016-04-21"
}, {
"@type": "Role",
"hasOccupation": {
"name": "Chief Strategic Officer"
},
"startDate": "2013-11-14",
"endDate": "2016-03-22"
}, {
"@type": "Role",
"hasOccupation": {
"name": "Vice President of Sales"
},
"startDate": "2009-09-20",
"endDate": "2013-10-14"
}
]
}
通过Google的Structured Data Testing Tool:
hasOccupation
不是hasOccupation
属性的有效目标类型。
答案 0 :(得分:0)
您没有在Role
内提供Occupation
值的类型。它期望一个"hasOccupation": {
"name": "Management Consultant"
}
值。
所以这个
"hasOccupation": {
"@type": "Occupation",
"name": "Management Consultant"
}
应该变成这个
{{1}}
(与其他情况相同。)