Question

I have been playing with JSON-LD a while and am wondering your usage is correct? Shouldn't @context contain a URL? The validator seems to accept both.. the playground on json-ld.org strangely neither. It returns the following error:

{"name":"jsonld.InvalidUrl","message":"Derefencing a URL did not result in a valid JSON-LD object. Possible causes are an inaccessible URL perhaps due to a same-origin policy (ensure the server uses CORS if you are using client-side JavaScript), too many redirects, or a non-JSON response.","details":{"url":"http://schema.org","cause":{"name":"jsonld.LoadContextError","message":"URL could not be dereferenced, an error occurred.","details":{"url":"http://schema.org","cause":""}}}}

Thanks, Sam

Was it helpful?

Solution

The context schema.org is correctly understood by Google and the decision to drop the http:// was made in order to simplify the developers' lives.

Check this W3C thread for the complete discussion about this implementation: http://lists.w3.org/Archives/Public/public-rdf-wg/2013May/0183.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top