Hey all, a short reminder: there is another gathering tonight around ActivityPub, starting at 19:30h!


On 10/12/2018 11:48 AM, Luke Murphy wrote:
a brief recap of what we did last night for those that couldn't make it:

Nice! Thanks for that. There really is quite a lot to cover ...

The Linked Data aspect is the fact that in the standard one can always
expect certain information to be present in the JSON objects. (If I
understood this correctly, Luke?) Such as Actors always having an inbox
for their incoming messages. You don't know what the url for that inbox
is but the JSON document describing the 'Actor' will point you to that
URL always:

So, I was wrong about this. I'm still try to really wrap my head around
it but it seems that the JSON-LD part is much more interesting than I
first thought. It practically has it's own little world to discover ...

Here's a lovely explanation I found:

"The key feature that JSON-LD provides is the ability to give the keys
and values in those JSON documents semantic meaning. It does this by
associating the keys in your JSON documents to URL’s that can be used by
a developer or an application to know what to expect the value to be and
how that value should be treated (its type, schema, other objects, etc)."

So, not specifically for expecting certain keys, but for understanding
the values of those keys. So, from your 100867303378203169 status,
loaded into the 'JSON-LD playground':
https://json-ld.org/playground/?startTab=tab-compacted&json-ld={%22%40context%22%3A[%22https%3A%2F%2Fwww.w3.org%2Fns%2Factivitystreams%22%2C%22https%3A%2F%2Fw3id.org%2Fsecurity%2Fv1%22%2C{%22manuallyApprovesFollowers%22%3A%22as%3AmanuallyApprovesFollowers%22%2C%22sensitive%22%3A%22as%3Asensitive%22%2C%22movedTo%22%3A{%22%40id%22%3A%22as%3AmovedTo%22%2C%22%40type%22%3A%22%40id%22}%2C%22Hashtag%22%3A%22as%3AHashtag%22%2C%22ostatus%22%3A%22http%3A%2F%2Fostatus.org%23%22%2C%22atomUri%22%3A%22ostatus%3AatomUri%22%2C%22inReplyToAtomUri%22%3A%22ostatus%3AinReplyToAtomUri%22%2C%22conversation%22%3A%22ostatus%3Aconversation%22%2C%22toot%22%3A%22http%3A%2F%2Fjoinmastodon.org%2Fns%23%22%2C%22Emoji%22%3A%22toot%3AEmoji%22%2C%22focalPoint%22%3A{%22%40container%22%3A%22%40list%22%2C%22%40id%22%3A%22toot%3AfocalPoint%22}%2C%22featured%22%3A{%22%40id%22%3A%22toot%3Afeatured%22%2C%22%40type%22%3A%22%40id%22}%2C%22schema%22%3A%22http%3A%2F%2Fschema.org%23%22%2C%22PropertyValue%22%3A%22schema%3APropertyValue%22%2C%22value%22%3A%22schema%3Avalue%22}]%2C%22id%22%3A%22https%3A%2F%2Fpost.lurk.org%2Fusers%2Frra%2Fstatuses%2F100867303378203169%2Factivity%22%2C%22type%22%3A%22Create%22%2C%22actor%22%3A%22https%3A%2F%2Fpost.lurk.org%2Fusers%2Frra%22%2C%22published%22%3A%222018-10-09T19%3A21%3A46Z%22%2C%22to%22%3A[%22https%3A%2F%2Fwww.w3.org%2Fns%2Factivitystreams%23Public%22]%2C%22cc%22%3A[%22https%3A%2F%2Fpost.lurk.org%2Fusers%2Frra%2Ffollowers%22%2C%22https%3A%2F%2Fpuckipedia.com%2F%22]%2C%22object%22%3A{%22id%22%3A%22https%3A%2F%2Fpost.lurk.org%2Fusers%2Frra%2Fstatuses%2F100867303378203169%22%2C%22type%22%3A%22Note%22%2C%22summary%22%3Anull%2C%22inReplyTo%22%3Anull%2C%22published%22%3A%222018-10-09T19%3A21%3A46Z%22%2C%22url%22%3A%22https%3A%2F%2Fpost.lurk.org%2F%40rra%2F100867303378203169%22%2C%22attributedTo%22%3A%22https%3A%2F%2Fpost.lurk.org%2Fusers%2Frra%22%2C%22to%22%3A[%22https%3A%2F%2Fwww.w3.org%2Fns%2Factivitystreams%23Public%22]%2C%22cc%22%3A[%22https%3A%2F%2Fpost.lurk.org%2Fusers%2Frra%2Ffollowers%22%2C%22https%3A%2F%2Fpuckipedia.com%2F%22]%2C%22sensitive%22%3Afalse%2C%22atomUri%22%3A%22https%3A%2F%2Fpost.lurk.org%2Fusers%2Frra%2Fstatuses%2F100867303378203169%22%2C%22inReplyToAtomUri%22%3Anull%2C%22conversation%22%3A%22tag%3Apost.lurk.org%2C2018-10-09%3AobjectId%3D661410%3AobjectType%3DConversation%22%2C%22content%22%3A%22%3Cp%3Ewhile%20trying%20to%20reverse%20engineer%20%3Ca%20href%3D\%22https%3A%2F%2Fpost.lurk.org%2Ftags%2Factivitypub\%22%20class%3D\%22mention%20hashtag\%22%20rel%3D\%22tag\%22%3E%23%3Cspan%3Eactivitypub%3C%2Fspan%3E%3C%2Fa%3E%20implementations%20in%20order%20to%20learn%20about%20the%20protocol%20during%20tonight%26apos%3Bs%20homebrewserver.club%20meeting%20we%20discovered%20%3Cspan%20class%3D\%22h-card\%22%3E%3Ca%20href%3D\%22https%3A%2F%2Fpuckipedia.com%2F\%22%20class%3D\%22u-url%20mention\%22%3E%40%3Cspan%3Epuckipedia%3C%2Fspan%3E%3C%2Fa%3E%3C%2Fspan%3E%20whose%20website%20just%20with%20responds%20bare%20JSON-LD%20objects.%20It%20is%20like%20an%20interactive%20tutorial%20to%20AP.%20At%20this%20point%20in%20time%20it%20actually%20the%20only%20hands-on%20place%20to%20learn%20how%20AP%20works%20without%20having%20to%20wrap%20one%26apos%3Bs%20head%20around%20the%20spec%20%F0%9F%91%8F%F0%9F%8F%BF%20.%3C%2Fp%3E%22%2C%22contentMap%22%3A{%22en%22%3A%22%3Cp%3Ewhile%20trying%20to%20reverse%20engineer%20%3Ca%20href%3D\%22https%3A%2F%2Fpost.lurk.org%2Ftags%2Factivitypub\%22%20class%3D\%22mention%20hashtag\%22%20rel%3D\%22tag\%22%3E%23%3Cspan%3Eactivitypub%3C%2Fspan%3E%3C%2Fa%3E%20implementations%20in%20order%20to%20learn%20about%20the%20protocol%20during%20tonight%26apos%3Bs%20homebrewserver.club%20meeting%20we%20discovered%20%3Cspan%20class%3D\%22h-card\%22%3E%3Ca%20href%3D\%22https%3A%2F%2Fpuckipedia.com%2F\%22%20class%3D\%22u-url%20mention\%22%3E%40%3Cspan%3Epuckipedia%3C%2Fspan%3E%3C%2Fa%3E%3C%2Fspan%3E%20whose%20website%20just%20with%20responds%20bare%20JSON-LD%20objects.%20It%20is%20like%20an%20interactive%20tutorial%20to%20AP.%20At%20this%20point%20in%20time%20it%20actually%20the%20only%20hands-on%20place%20to%20learn%20how%20AP%20works%20without%20having%20to%20wrap%20one%26apos%3Bs%20head%20around%20the%20spec%20%F0%9F%91%8F%F0%9F%8F%BF%20.%3C%2Fp%3E%22}%2C%22attachment%22%3A[]%2C%22tag%22%3A[{%22type%22%3A%22Mention%22%2C%22href%22%3A%22https%3A%2F%2Fpuckipedia.com%2F%22%2C%22name%22%3A%22%40puckipedia%40puckipedia.com%22}%2C{%22type%22%3A%22Hashtag%22%2C%22href%22%3A%22https%3A%2F%2Fpost.lurk.org%2Ftags%2Factivitypub%22%2C%22name%22%3A%22%23activitypub%22}]}}&frame={}&context={%22%40context%22%3A%22http%3A%2F%2Fschema.org%2F%22}

We can see the 'compacted' tab and 'extended' tab. These correspond to:
https://www.w3.org/TR/json-ld-api/#compaction
https://www.w3.org/TR/json-ld-api/#expansion

So, in the compacted version, if I find 'actor', I can expand it (using
the JSON-LD expansion algorithm) and then get my IRI (link), which
points to a unique location  on the interwebz where I can learn how to
handle the value. Machines then learn how to handle the values there
too.

Following our DIY momentum, we can do this manually:
actor: https://www.w3.org/ns/activitystreams#actor -> https://www.w3.org/TR/activitystreams-vocabulary/#dfn-actor
context: https://www.w3.org/ns/activitystreams#context -> https://www.w3.org/TR/activitystreams-vocabulary/#dfn-context

Finally, I found this amazing list of vocabularies: https://schema.org/docs/full.html

So, if I build an application which somehow wants to describe a performance art theatre, I'd use:
https://schema.org/PerformingArtsTheater

And loaded into the playground (see bottom tab on that page for JSON-LD response), we get:
https://json-ld.org/playground/#startTab=tab-expanded&json-ld=%7B%22%40context%22%3A%22http%3A%2F%2Fschema.org%22%2C%22%40type%22%3A%22TheaterEvent%22%2C%22name%22%3A%22Julius%20Caesar%20at%20Shakespeare's%20Globe%22%2C%22location%22%3A%7B%22%40type%22%3A%22PerformingArtsTheater%22%2C%22name%22%3A%22Shakespeare's%20Globe%22%2C%22sameAs%22%3A%22http%3A%2F%2Fwww.shakespearesglobe.com%2F%22%2C%22address%22%3A%22London%2C%20UK%22%7D%2C%22offers%22%3A%7B%22%40type%22%3A%22Offer%22%2C%22url%22%3A%22%2Fexamples%2Fticket%2F0012301230123%22%7D%2C%22startDate%22%3A%222014-10-01T19%3A30%22%2C%22workPerformed%22%3A%7B%22%40type%22%3A%22CreativeWork%22%2C%22name%22%3A%22Julius%20Caesar%22%2C%22sameAs%22%3A%22http%3A%2F%2Fworldcat.org%2Fentity%2Fwork%2Fid%2F1807288036%22%2C%22creator%22%3A%7B%22%40type%22%3A%22Person%22%2C%22name%22%3A%22William%20Shakespeare%22%2C%22sameAs%22%3A%22http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FWilliam_Shakespeare%22%7D%7D%7D&context=%7B%7D

I'll leave it there ... ;)
_______________________________________________
HBSC mailing list -- hbsc@we.lurk.org
To unsubscribe send an email to hbsc-leave@we.lurk.org