veganism.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Veganism Social is a welcoming space on the internet for vegans to connect and engage with the broader decentralized social media community.

Administered by:

Server stats:

295
active users

#jsonld

0 posts0 participants0 posts today
Continued 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/?

Continued 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/?

Continued 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/?

Another nail in the coffin for #JsonLD:

{
    "id": "https://zotum.net/conversation/235e8736-1b3e-4d7f-ab9e-3d49f04ecda7",
    "orderedItems": [
        {
            "type": "Add",
            "object": {
                "type": "Create",
                "object": {
                    "type": "Note",
                    "id": "https://zotum.net/item/235e8736-1b3e-4d7f-ab9e-3d49f04ecda7",
                    "published": "2025-02-25T20:28:33Z",
                    [... original version of post ... ]
                },
            },
        },
        {
            "type": "Add",
            "object": {
                "type": "Update",
                "object": {
                    "type": "Note",
                    "id": "https://zotum.net/item/235e8736-1b3e-4d7f-ab9e-3d49f04ecda7",
                    "published": "2025-02-25T20:28:33Z",
                    "updated": "2025-02-25T20:29:03Z",
                    [... edited version of post ...]
                },

That's a post that I edited shortly after I first made it. The corresponding conversation container contains both the original Create, and an Update with the changes. This means that the embedded Note object appears twice, with different contents, but with the same ID.

JSON-LD processing will kind of squish them together into the same object that contains both the original and the new content etc. Handling this as JSON-LD will mean recognising the high level structure of it first, and then iterating over the orderedItems and processing them individually, rather than trying to treat the whole thing as a single JSON-LD message.

#ActivityPubDev
zotum.netZotum

Currently building a collection loader for #Astro that is reading entities from a set of cross linked #jsonld documents and creates a graph from them.

I am trying to convince myself this is just an over engineered CMS and not a flat file DBMS in disguise.

Continued thread

3/

ActivityPub & ActivityStreams are based on JSON-LD — a format that is not (non-programmer) human-legible & human-writable

Maybe we need an alternative way of encoding ActivityPub & ActivityStreams in situations where (non-programmer) humans might read it or write it

Maybe the INI file data format? Or something else that is friendly to (non-programmer) humans?

Continued thread

9/

And just for the record —

Just like everyone else I contacted about their 'discoverable' flag being defaulted to 'false' —

He wasn't aware of the 'discoverable' flag existing (just like everyone else I contacted).

He didn't want to be hidden (just like everyone else I contacted).

He changed it to 'true' (just like everyone else I contacted).

Continued thread

8/

As it is now, I think the 'discoverable' flag is broken.

And, I think the whole user-experience (UX) around the 'discoverable' flag is poor.

And, I think Fediverse software treating a 'false' value for 'discoverable' as "not discoverable" (rather than "not discoverable" or "no choice made") has hugely negative consequences for the user-experience (UX) of the Fediverse

Continued thread

7/

So now I have to DM Ben to tell him that his 'discoverable' flag is set to false

He (just like everyone else I contacted) will likely not even be aware that the 'discoverable' flag exists

And (just like everyone else I contacted) wished it wasn't set to false

And then (just like everyone else I contacted) struggle to find where he can set it to true

And then set it

Continued thread

6/

As it is now, the 'discoverable' flag seems broken to me.

Because 'false' doesn't actually mean 'false'.

'false' (in practice) means both "not discoverable" and "no choice made". And this is a very unfortunate situation —

Because the idea of a 'discoverable' flag is a good idea — but this problem with the meaning of 'false' and the UX consequences a big deal.

Continued thread

5/

JSON and has a 'null'. That could have been used for the 'discoverable' flag.

We could have had so that:

'discoverable' set to 'true' meant that the user explicitly chose to be discoverable.

'discoverable' set to 'false' meant that the user explicitly chose to not be discoverable.

And 'discoverable' set to 'null' meant that the user has not explicitly made a choice.