0

For the following entity, the agent value options are "Organization" or "Person". However, the agent I would like to define is different, let's say my dog (as an example). How does one go about doing this? Creating a custom extension? Don't know if this is even remotely close, could use some advice.

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."
        }
   }
};
Ron I
  • 4,090
  • 8
  • 33
  • 64
  • To be clear, you are not asking about this implementation, but in general, how to create/define new types (that are not defined in Schema.org) that can be used in JSON-LD (I assume?), correct? – unor Oct 04 '18 at 18:59
  • @unor yes, correct, thanks, how to create/define in JSON-LD, sorry total newbie with schemas! – Ron I Oct 04 '18 at 19:42
  • 1
    Okay. Does [this answer](https://stackoverflow.com/q/38585416/1591669) help? The question is about properties instead of types, but it works the same way. – unor Oct 04 '18 at 20:26
  • @unor it does thanks! – Ron I Oct 05 '18 at 16:13
  • Great :) I closed this question as duplicate. Feel free to ask additional questions if the answer left something unclear. – unor Oct 06 '18 at 01:34

0 Answers0