为自定义实体扩展Schema.org

时间:2018-10-04 16:53:30

标签: schema schema.org

对于以下实体,座席值选项为“组织”或“人”。但是,我想定义的代理是不同的,以我的狗为例。如何做到这一点?创建自定义扩展?不知道这是否距离很近,可以使用一些建议。

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."
        }
   }
};

0 个答案:

没有答案
相关问题