【发布时间】:2018-11-01 09:16:03
【问题描述】:
我正在尝试在 JSON-LD 中创建关系上下文。我的目标是指定模式类型的数据类型。
示例:所有 Actors 都是 Person,所有 Director 都是 Person,所有 Person 只有一个属性 Name。
{
"@context" : {
"actor" : {
"@type" : "http://schema.org/Person",
"@id" : "http://schema.org/actor"
},
"director" : {
"@type" : "http://schema.org/Person",
"@id" : "http://schema.org/director"
},
"Person" : {
"@type" : "http://schema.org/name",
"@id" : "http://schema.org/Person"
}
}
}
但 Google 的 SDTT 无法识别 @type 并表示未指定。我如何在这里给出上下文?我希望 SDTT 按姓名识别演员和导演。
{
"actor" : ["Johnny Depp", "Christina Ricci"],
"director" : "Tim Burton"
}
【问题讨论】:
标签: json-ld google-rich-snippets