i'm trying to learn JSON-LD. is the @context link just kind of a type definition ?
Conversation
Notices
-
Embed this notice
jorun (amd64sucks@wetdry.world)'s status on Monday, 22-Aug-2022 11:29:34 JST jorun - Hélène likes this.
-
Embed this notice
Hélène (helene@p.helene.moe)'s status on Monday, 22-Aug-2022 11:29:52 JST Hélène @amd64sucks think of it like imports I guess -
Embed this notice
jorun (amd64sucks@wetdry.world)'s status on Monday, 22-Aug-2022 21:02:24 JST jorun @helene imports of "types" ?
Hélène likes this. -
Embed this notice
Hélène (helene@p.helene.moe)'s status on Monday, 22-Aug-2022 21:02:42 JST Hélène @amd64sucks you can see it that way i guess? :thinking_cirno: it's more of "names" -
Embed this notice
jorun (amd64sucks@wetdry.world)'s status on Tuesday, 23-Aug-2022 04:14:41 JST jorun @helene i don't understand anything
Hélène likes this. -
Embed this notice
Hélène (helene@p.helene.moe)'s status on Tuesday, 23-Aug-2022 04:15:14 JST Hélène @amd64sucks it's a concept of its own, are you reading the specs themselves? they're fairly clear -
Embed this notice
Tosti ? (tost@mk.toast.cafe)'s status on Tuesday, 23-Aug-2022 04:16:39 JST Tosti ? @amd64sucks@wetdry.world @helene@p.helene.moe basically, every entry in @context allows you to transform a matching (by a set of rules) key into another key, and/or a matching (by a different set of rules) "basic" value into an object
Hélène likes this. -
Embed this notice
jorun (amd64sucks@wetdry.world)'s status on Tuesday, 23-Aug-2022 04:19:14 JST jorun @helene i am actually. i don't find them clear (it's a common thing for me)
Hélène likes this. -
Embed this notice
Tosti ? (tost@mk.toast.cafe)'s status on Tuesday, 23-Aug-2022 04:19:15 JST Tosti ? @amd64sucks@wetdry.world @helene@p.helene.moe me too tbh
Hélène likes this. -
Embed this notice
Hélène (helene@p.helene.moe)'s status on Tuesday, 23-Aug-2022 04:21:08 JST Hélène @amd64sucks hmmm basically, @context is like defining aliases and used namespaces
for example the field “as:actor” if you have "as": "https://www.w3.org/ns/activitystreams#" will be expanded to “https://www.w3.org/ns/activitystreams#actor”
stuff like that
-
Embed this notice
jorun (amd64sucks@wetdry.world)'s status on Tuesday, 23-Aug-2022 04:21:13 JST jorun @tost @helene is a "basic" value stuff like strings and numbers ?
Hélène likes this. -
Embed this notice
jorun (amd64sucks@wetdry.world)'s status on Tuesday, 23-Aug-2022 04:29:53 JST jorun @helene is it important what's behind the URL ? as it always goes to an HTML document
Hélène likes this. -
Embed this notice
Tosti ? (tost@mk.toast.cafe)'s status on Tuesday, 23-Aug-2022 04:29:55 JST Tosti ? @amd64sucks@wetdry.world @helene@p.helene.moe it doesn't - try doing the query with an Accept header that targets application/json or application/activity+json
Hélène likes this. -
Embed this notice
Hélène (helene@p.helene.moe)'s status on Tuesday, 23-Aug-2022 04:32:40 JST Hélène @tost @amd64sucks yeah, i’d recommend doing
xh -Fb "https://www.w3.org/ns/activitystreams" 'Content-Type:application/json; charset=utf-8' 'Accept:application/ld+json; profile="https://www.w3.org/ns/activitystreams"';
(works with curl too of course, etc)
but it doesn’t have to be the case, it’s just a neat trick consider URIs as “obscure immutable things”, pretty much. forget any previous notion you have of them, and only treat them for what they are, don’t try to parse them or to modify them, they’re more like atoms