2 ms·
You (and the people in those issues including Gargron) are confusing contexts URLs and namespaces. "@context":[{"toot":"http://joinmastodon.org/ns# http://joinm
by progval 3y ago
You (and the people in those issues including Gargron) are confusing contexts URLs and namespaces. "@context":[{"toot":"http://joinmastodon.org/ns# http://joinmastodon.org/ns#"}] defines a "toot" prefix for the http://joinmastodon.org/ns# http://joinmastodon.org/ns# namespace and namespaces don't have to resolve to anything. "@context":["http://joinmastodon.org/ns# http://joinmastodon.org/ns#"] would be incorrect, but that's not what Mastodon does.
Some of the namespaces used by the JSON-LD spec itself (https://www.w3.org/TR/json-ld11/#conformance https://www.w3.org/TR/json-ld11/#conformance) don't resolve either. For example:
$ curl -X GET -H "Accept:application/ld+json" https://www.w3.org/ns/prov -L
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>406 Not Acceptable</title>
EDIT: it seems the source of the misunderstanding in the issue you linked is that GoToSocial used to send "@context": ["http://joinmastodon.org/ns http://joinmastodon.org/ns", ...], ie. using it as a context URL instead of a namespace: https://github.com/friendica/friendica/issues/10740#issuecomment-924474840 https://github.com/friendica/friendica/issues/10740#issuecom...
- konart 3y agoOkay, I stand corrected. Examples at https://docs.joinmastodon.org/spec/activitypub/#featured https://docs.joinmastodon.org/spec/activitypub/#featured and this new information give better understanding of the spec. (I find it quite confusing anyway to be honest).
- progval 3y agoYes, I agree. I work with JSON-LD in various contexts, and while it's lovely in theory when only working with people specialized in knowledge graphs, in practice it's full of counter-intuitive stuff like this. I believe that RDF/XML as capable and less confusing, but it is scary to programmers because XML.