4 ms·
Does it? Mastodon writes "toot":"http://joinmastodon.org/ns# http://joinmastodon.org/ns#" in its objects' "@context" as required by JSON-LD. What's wrong with i
by progval 3y ago
Does it? Mastodon writes "toot":"http://joinmastodon.org/ns# http://joinmastodon.org/ns#" in its objects' "@context" as required by JSON-LD. What's wrong with it?
- mariusor 3y agoThe fact that it resolves to a 404 page?
- konart 3y agoThe thing is you should be able to send a request and get back the content of this context for dereferencing like so: curl -X GET -H "Accept:application/ld+json" https://www.w3.org/ns/activitystreams Mastodon does not provide this data, so this is a fake namespase https://github.com/mastodon/joinmastodon/issues/148#issuecomment-1114174935 https://github.com/mastodon/joinmastodon/issues/148#issuecom... https://github.com/go-fed/activity/issues/152 https://github.com/go-fed/activity/issues/152
- progval 3y agoYou (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.