Re: EXTERNAL: Re: wher is the Schema.org context?

Hi Robert



 

John 



3)      Drives me nuts not understanding how “playground” knows what a “http://schema.org/Person”  is.

It doesn't, it only knows how to use the JSON-LD context to map the value for "@type" key to a URI. If you then 'follow your nose' and dereference http://schema.org/Person then you get a representation of that thing that tells you that schema:Person has type rdfs:Class [1]. If that thing does not exists e.g. http://schema.org/Foo then you get a 404 response.

 

When I “follow my nose” to http://schema.org/Person I get a webpage, not at json-ld document (even when using ACCEPT header). Hence should http://schema.org/Person have jsonld context or is my code expected to handle the RDFa that appears to be returned?

In an ideal world the response would be a JSON-LD representation of the Person class. It would be logical to assume this would refer to the remote JSON-LD context published on http://schema.org/ rather than embed the same context block in each and every representation for each term in the vocabulary.

Another option would be if the JSON-LD block were embedded in the HTML using <script> tag.

Failing materialization of either of the above, then parsing the RDFa from the HTML is another option.

Cheers,
John

Received on Thursday, 4 December 2014 21:22:30 UTC