对于以下实体,座席值选项为“组织”或“人”。但是,我想定义的代理是不同的,以我的狗为例。如何做到这一点?创建自定义扩展?不知道这是否距离很近,可以使用一些建议。
let mySchema =
{
"@Property":{
"agent": {
"id":"https://schema.org/agent",
"@Types": {
"Organization": {
"id":"https://schema.org/Organization"
},
"Person": {
"id":"https://schema.org/Person"
},
"Animal": { // <-----custom entity!
"id":"https://example.com/Animal",
"@Types": {
"Dog": {
"id":"http://example.com/Dog",
"@Property": {
"id":"http://example.com/name",
"@Types": {
"id":"http://example.com/Text",
},
"@Description": {
"The dog's name"
}
}
}
}
}
},
"@Description": "The direct performer or driver of the action (animate or inanimate). e.g. John wrote a book."
}
}
};