hrefna, to random
@hrefna@hachyderm.io avatar

The gist of what I am going for with #JsonLD:

What is a minimal subset that would allow us to treat the @'context object as a set of extensions rather than a set of processing directives while still remaining useful?

Basically, you could have a "mastodon postprocessor" with all of the logic there.

I have a bunch of thoughts and have validated some, but I'm interested in the experience of those who have banged their head against this problem. Any ideas? Does that make sense as a goal?

hrefna, to random
@hrefna@hachyderm.io avatar

Heh, this—written in 2019—turned out to be mildly prophetic. https://overengineer.dev/blog/2019/01/13/activitypub-final-thoughts-one-year-later.html#what-activitypub-is

Now the question is where will we be 2-4 years from now? Can we make it better from here?

evangelos, to fediverse
@evangelos@libretooth.gr avatar

Is there a fedi client that uses json-ld link relations successfully?

#jsonld #fediverse #activitypub #linkrelations #linkingdata

hrefna, to fediverse
@hrefna@hachyderm.io avatar

I am looking for a few people who would be willing to review my (WIP) JSON-LD Reduced #FEP.

It's a little rough right now, but really I need to get others eyes on it if I am going to make any progress on it and I've been sitting on it long enough.

The basic goal is to make it so that you can use JSON-LD's context as a list of extensions and reduce the processing complexity, without actually breaking anyone who chooses to adopt it.

#JsonLD #ActivityPub

linos, to fediverse German
@linos@graz.social avatar

Why are we using json-ld in the world at all? Almost no application parses it, and even fewer seem to do it right.

hrefna, (edited ) to random
@hrefna@hachyderm.io avatar

As I read through the discussions around the creation of and revisions around #RDF three things are clear in my eye.

  1. Usability was not the primary concern. It seems to have been widely believed that Other Tools™ would fill this gap and that RDF should focus first on a kind of expressibility.

  2. Those Other Tools™ never materialized.

  3. Most who use RDF-derived tooling seem to assume either that it gives them those tools or that Others™ will build them on top of their solution as well

hrefna, (edited )
@hrefna@hachyderm.io avatar

Does this mean that #JsonLD is useless here?

No. But it does mean that if you are going to use it you need to layer on top of it some additional set of restrictions.

You could easily say, for example, that "tag must always be a list/set/bag of links" (or whatever), imposing a syntactic (a list) and semantic (links) restriction.

You could say "Create must always include the full object, adjusted for permissions, Update must always be just the URI referencing the object."

hrefna, to random
@hrefna@hachyderm.io avatar

There's a commonish antipattern I've seen that goes like the following:

  1. It's important either to an individual or at a point in time that a tool be agnostic to the platform it is built on top of.

  2. They "achieve" this with a Very Stern Lecture™ and/or heroics from an individual or a team of individuals.

  3. They do not use a library or an abstraction toolkit.

  4. They end up with a leaky abstraction that neither takes advantage of what it is situated on nor independent of it

1/

hrefna,
@hrefna@hachyderm.io avatar

As much as I dislike #JsonLD for this use case (and oh can I tell you about why I dislike it for this use case), I actually think in many ways #ActivityPub would be better if it went all-in with it.

Because right now I can't use any of the features of JSON-LD that make it actually powerful, but I've inherited a lot of the problems with the worldview.

HTTP is similar (except I don't hate it for this use case): by not committing we end up in a half-state. Neither fish, flesh, nor fowl.

6/

hrefna, to random
@hrefna@hachyderm.io avatar

Okay, so if you are using a bearcap, like say:

bear:?t=<token>&u=https://example.com/foo'

Then a malicious entity injects into your context an element that says:

"bear": "https://hostile.example.io/#"

or some equivalent.

What is the expected behavior when this is parsed in #JsonLD? Is it what I think it is?

hrefna, to fediverse
@hrefna@hachyderm.io avatar

As I've gotten more experience as an engineer I shifted pretty heavily toward opinionated designs, systems, and procedures.

A strongly opinionated system is more often a delight to work with—or if I can't work with it to know that ahead of time—than something that tries to make it so that it fits everything

Going first into #ActivityPub and now more into #JsonLD I am reminded why.

It turns out that just as "not to decide is to decide," it's also true that "a lack of opinions is an opinion."

manlycoffee, to fediverse
@manlycoffee@techhub.social avatar

Are there any Fediverse software that doesn't respect JSON-LD?

I could have sworn there was one.

I think it was Pleroma #ActivityPub #JSONLD #Fediverse

arnelson, to fediverse

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?

#Fediverse #Java #SemanticWeb #RDF #JsonLD

evan, to fediverse
@evan@cosocial.ca avatar

#ActivityPub #JSONLD folks: is there a JSON-LD equivalent of JSON Patch? I haven't found one.

https://jsonpatch.com/

hrefna, to random
@hrefna@hachyderm.io avatar

Features I'd like to see in #JsonLD libraries that I can't find many (if any) examples of:

  1. Input validation. This is common in APIs, but gets glossed over in a lot of JSON-LD libraries.

  2. Limits on loading outside contexts (e.g., only loading to a certain depth, limiting the size of the download, etc).

  3. Versioning outside contexts.

  4. Limits on the kinds of IRIs that can be constructed and loaded.

  5. More unit tests. There are lots of integration tests but few unit tests.

hrefna, to fediverse
@hrefna@hachyderm.io avatar

Really my toy #JsonLD project is a "dissent and commit" project from me.

I don't like JSON-LD, I don't actually think it is the way forward except in a very narrow sense, but I also don't think we will succeed in getting rid of it and protocols like #ActivityPub are too entrenched and too necessary for what I want to see of the internet in the long run.

So I have questions about can we make production ready systems—by my standards—that rely heavily on JSON-LD features.

jenniferplusplus, to random
@jenniferplusplus@hachyderm.io avatar

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.

hazel, to fediverse

I'm excited to share a little thing I've been working on!

Over the past few months, I've been studying the various OSS projects that are based on / . This started as personal research - I wanted to see how everyone else is tackling the unique challenge of implementing ActivityPub (with the oddities of and the structural incompatibility of ) in a strongly-typed language like C#. It ended that way too - I got some ideas and moved on with my project. But I was unhappy with the overall state of .NET ActivityPub implementations, so I decided to continue the research in hope of encouraging development in this area.

As of yesterday, I've finally reviewed the very last project that I'm aware of. And to share those findings, I've put together a little website / index thing with information and links to all the project repositories. Its simple, its basic, but I hope its useful to the other peeps out there!

You can get to the webpage itself at this link, and I welcome feedback, corrections, and contributions on GitHub.

I plan to do a bit more work on this, particularly to implement a search function. But I decided to go ahead and post it now because it turns out that there are way less of these projects than I'd hoped. :blobfoxsad:​

smol edit: forgot to tag the groups 🤦‍♀️
@bot @activitypub @dotnet @csharp

FenTiger, to fediverse
@FenTiger@mastodon.social avatar

Oh, wow, that's a new one.

I'm honestly starting to wonder if I should just ignore the incoming context completely.

manlycoffee, to fediverse
@manlycoffee@techhub.social avatar

Pro and con of using RDF-like data interchange specification (e.g. JSON-LD) for a social media network specification.

Pro:

  • extensibility, without needing to amend the actual specification; you do you

Con:

  • too many edge cases

#JSONLD #Fediverse #ActivityPub

hrefna, to fediverse
@hrefna@hachyderm.io avatar

I've been toying around with a mental model that the way that #JsonLD tends to work on the #fediverse for a lot of the major implementations I'd describe as "JSON-LD for thee and not for me."

Because they will do things like write out large contexts, but then never read contexts to know what they are looking at.

  • If you are the 800 lbs gorilla you don't need JSON-LD.
  • If you are not the 800 lbs gorilla you are playing "wackamole driven development" and need to at least read it heuristically
hrefna, to fediverse
@hrefna@hachyderm.io avatar

Ranting: I'm really growing to despise some of the features around how #ActivityPub interacts with #JsonLD, not because you "need to parse JSON-LD," but because of the JSON-LD worldview.

For example, let's look at the tag item on the Actor object.

Tag is defined in the context as:

"as": "<https://www.w3.org/ns/activitystreams#>",  
"tag": {  
 "@'id": "as:tag",  
 "@'type": "@'id"  
 },  

We can see that a "tag" can be any Object xor Link from the spec.

But wait, there's more.

1/

hrefna, to fediverse
@hrefna@hachyderm.io avatar

Yes, I am probably going to be ranting about the union type problem in #ActivityPub/ #JsonLD more than usual at least until I get this serialization pattern worked out…

…or until I decide to just chuck it all out of the window and only write or accept one format.

manlycoffee, to golang
@manlycoffee@techhub.social avatar

I think I found a decent solution to unmarshalling JSON-LD in Go.

Use Mitchell Hashimoto's mapstructure library.

#Go #GoLang #JSONLD #Programming #Coding

manlycoffee, to fediverse
@manlycoffee@techhub.social avatar

Biting the bullet on this one thing:

all JSON-LD documents that's supposed to "represent" an actor must contain a single root node, when interpreting the compacted and expanded JSON-LD.

The only thing that I'm not sure of is whether the ID of the object that represents the actor should absolutely match the URL from which the JSON-LD document was retrieved from.

Mastodon will refuse to pull up the profile of a user that has its root-level node's ID not match the URL from which it was loaded from.

#JSONLD #ActivityPub

naturzukunft, to fediverse
hrefna, to fediverse
@hrefna@hachyderm.io avatar

You have got to be kidding me

(from Composition of Semantically Enabled Geospatial Web Services)

#JsonLD #ActivityPub

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • mdbf
  • ngwrru68w68
  • modclub
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • DreamBathrooms
  • JUstTest
  • GTA5RPClips
  • tacticalgear
  • normalnudes
  • tester
  • osvaldo12
  • everett
  • cubers
  • ethstaker
  • anitta
  • Leos
  • cisconetworking
  • provamag3
  • lostlight
  • All magazines