Schema.org中的多个属性 JSON-LD
Multiple property in Schema.org JSON-LD
我正在尝试像这样制作一个 JSON-LD:
????: {
"@type": "Person",
"jobTitle": "CEO",
"givenName": "Name",
"familyName": "Name",
"email": "mailto:info@example.com"
}
我应该在“????”的位置写什么?是,如果给定的信息既适用于员工,也适用于创始人?
我认为JSON-LD不允许同一个值有多个属性。
但不是重复数据……
"employee": {
"@type": "Person",
"name": "John Doe"
},
"founder": {
"@type": "Person",
"name": "John Doe"
}
…您可以只定义一次 Person
,给它一个 URI,并将此 URI 引用为 employee
和 founder
的值:
"@type": "Person",
"@id": "/team/john-doe#i",
"name": "John Doe"
"employee": {"@id": "/team/john-doe#i"},
"founder": {"@id": "/team/john-doe#i"}
(details and a complete example with @id
)
我正在尝试像这样制作一个 JSON-LD:
????: {
"@type": "Person",
"jobTitle": "CEO",
"givenName": "Name",
"familyName": "Name",
"email": "mailto:info@example.com"
}
我应该在“????”的位置写什么?是,如果给定的信息既适用于员工,也适用于创始人?
我认为JSON-LD不允许同一个值有多个属性。
但不是重复数据……
"employee": {
"@type": "Person",
"name": "John Doe"
},
"founder": {
"@type": "Person",
"name": "John Doe"
}
…您可以只定义一次 Person
,给它一个 URI,并将此 URI 引用为 employee
和 founder
的值:
"@type": "Person",
"@id": "/team/john-doe#i",
"name": "John Doe"
"employee": {"@id": "/team/john-doe#i"},
"founder": {"@id": "/team/john-doe#i"}
(details and a complete example with @id
)