Question

I am experimenting with JSON-LD and I am having a problem loading a remote context, I keep getting the error “Derefencing a URL did not result in a valid JSON-LD object”.

I have copied the context from http://json-ld.org/contexts/person to our server (http://vocab.lappsgrid.org/person.jsonld) and I am testing on the JSON-LD playground (http://json-ld.org/playground/). My first thought was that the content-type of the returned document is incorrect, but I’ve double checked and the content-type is application/ld+json so I do not know what else could be wrong; as far as I can tell the two contexts are identical, as are all relevant header fields.

Can anyone spot the problem?

Was it helpful?

Solution

I think this was answered on the public-linked-json@w3.org mailing list. If you're expecting something like the JSON-LD playground to dereference your context, then you need to be sure CORS headers are set to allow access from someplace other than the site defining the context.

OTHER TIPS

Yes, that was my post to the mailing list, and it was a problem with the CORS headers not being set correctly.

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