shakedown.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A community for live music fans with roots in the jam scene. Shakedown Social is run by a team of volunteers (led by @clifff and @sethadam1) and funded by donations.

Administered by:

Server stats:

266
active users

#jsonld

0 posts0 participants0 posts today
Replied in thread

one approach is to just say "well, plain JSON consumers should just stop being so naive". a valid approach, but not very robust!

our goal is to preserve the semantic boundary between different resources but still allow merging those resources naively (as JSON objects rather than as #JSONLD graphs).

instead of saying that a term will *always* mean the same thing in the entire document, we want to allow the same term to be used in different contexts across semantic boundaries (resources)...

6/?

Replied in thread

we have *some* tools to deal with this in #jsonld. we can "type-scope" so that an Activity.actor uses a certain definition, and a Movie.actor uses a certain definition, but this requires us to say ahead-of-time that `Movie` will always mean a schema.org `Movie`. it also won't help us redefine protected terms, since "type-scoped" terms don't override protection. only "property-scoped" terms do. but we can't use "property-scoped" terms because that requires an explicit semantic range.

4/?

Replied in thread

let's demo this with a simple case. say you want to `tag` something that is a `Movie` described by schema.org. the `Movie` declares that it has an `actor` who performed in it.

this is redefining the term `actor` as defined at the top-level by #activitystreams -- where `actor` means who performed an `Activity`, not who performed in a `Movie`.

if the activitystreams context was protected, then this would be a fatal error for any #jsonld validator. you cannot be sure which `actor` was meant!

3/?

i'm not 100% sure about this but i am starting to think that the way #jsonld context declarations propagate by default is generally an anti-pattern

the problem is when you cross a semantic boundary, which happens most often due to naively dereferencing and embedding an entire resource ("inlining", "hydration"). it's especially likely to be an issue when you are using one or more protected contexts (where terms can't be redefined later).

1/?

Let's say for some contrived (but very real) reason, I want to add { "toot": "http://joinmastodon.org/ns#", "Emoji": "toot:Emoji" } to @context, but another member of @context might be { "toot": "http://joinmastodon.org/ns#", "focalPoint": ... }

Would it be acceptable if I just pushed my object to the end and assumed that JSON-LD parsers would correctly reduce it down to:

{
  "toot": "http://joinmastodon.org/ns#",
  "Emoji": "toot:Emoji",
  "focalPoint": ...
}

... or should I be adding in logic to detect the existing member defining toot and merge the Emoji property in?

Java is an interesting language for a Fediverse project because it's the one language with several mature implementations of Semantic Web tech (RDF, SPARQL, etc). JSON-LD just works, out of the box. It was kind of shocking to see Apache Jena do in a few minutes of work what took me weeks in Deno!

And I learned about a piece of the Semantic Web ecosystem I wasn't familiar with before. Have you heard the good word of OWL?

Replied to Jenniferplusplus

I meant "blank node" in the sense described here. I think it's the JSON-LD Term to refer to objects (= nodes) without an id.

So my point was, implementing the ActivityPub inbox/outbox as OrderedCollections for objects without ids is not fun. It means that you either duplicate all activities for every actor that received it, or assign local ids. I like neither option.

I'm not sure how this relates to deleted objects.

Final note: This is not to say that I think Create/Update/Delete activities should have ids. My preference would be to consider ephemeral objects and rethink the Inbox/Outbox (as OrderedCollections). There's a queue/stream flag somewhere for people to take up the cause.

www.w3.orgJSON-LD 1.1JSON is a useful data serialization and messaging format. This specification defines JSON-LD 1.1, a JSON-based format to serialize Linked Data. The syntax is designed to easily integrate into deployed systems that already use JSON, and provides a smooth upgrade path from JSON to JSON-LD. It is primarily intended to be a way to use Linked Data in Web-based programming environments, to build interoperable Web services, and to store Linked Data in JSON-based storage engines.
Replied to Jenniferplusplus

If it is an ActivityPub thing, and you are not checking for the values being Objects or Sets, you are very lucky to have powerful preprocessing.

For example:

"preferredUsername": {
   "@type": "xsd:string", 
   "@language": "en",
   "@value": "helge"
}

would be 100% reasonable. Thanks to json-ld. Now, imagine that I had a name like "John" that people in Germany would like to Hannes, I would totally use:

"preferredUsername": [{
   "@type": "xsd:string", 
   "@language": "en",
   "@value": "john"
}, {
   "@type": "xsd:string", 
   "@language": "de",
   "@value": "hannes"
}]

and expect people from Germany to address me as hannes@mydomain.example and people from the United States as john@mydomain.example.

I totally think that I have just reached maximal "beauty" in my usage of JsonLD, ActivityPub, Webfinger, and i18n.

en.wikipedia.orgAlternate forms for the name John - Wikipedia

Good morning Fediverse. Still small clouds in on a light blue sky for me.

Anyway, I updated my fairer federation FEP Draft with a specification for embeddedObjects. I think for people understanding why I want signed objects, and why embedding them in JsonLD is hard, the correctness and necessity of my solution should be obvious.

My expectation is that this type of constructions will become prevalent if people want to optimize the number of requests necessary with ActivityPub, or say have something such as private groups, circles, etc ... (probably encryption). It will then very quickly be a gateway drug to move away from JsonLD to something like json-schema.

Codeberg.orgfep/fep/0008/fep-0008.md at fairer_federationfep - Fediverse Enhancement Proposals

Actually, I think what bothers me most about #JsonLd is that it completely misses the point of having specs and standards in the first place. Specs and standards are coordination. The whole point is to clarify, define, agree, and document things so that coordination costs stay linear, at worst.

Json-ld just says nope to that, and instead tries to replace coordination with computational wizardry. In my experience so far, it works as well as you might expect.