문제

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?

도움이 되었습니까?

해결책

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.

다른 팁

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top