I think it’s not correct when #ActivityPub thought leaders consider JSON-LD a schema definition language.
-
@evan @nik Using the OWL Ontology for validation is not ideal for multiple reasons. 1) It's not maintained, 2) it's not complete (only AS2, no AP), 3) it's not fully consistent with normative AS2, 4) it requires RDF, which requires JSON-LD processing of AP messages, 5) if you want message validation, you'll need write code to do something that already exists (SHACL, ShEx). I recommend JSON Schema for plain JSON applications.
-
Nik | Klampfradler 🎸🚲replied to Steve Bate last edited by
-
Steve Batereplied to Nik | Klampfradler 🎸🚲 last edited by
-
Nik | Klampfradler 🎸🚲replied to Steve Bate last edited by
-
-
Nik | Klampfradler 🎸🚲replied to Evan Prodromou last edited by [email protected]
-
-
Nik | Klampfradler 🎸🚲replied to Steve Bate last edited by
-
Steve Batereplied to Nik | Klampfradler 🎸🚲 last edited by
-
Nik | Klampfradler 🎸🚲replied to Steve Bate last edited by
The JSON-LD context is a link to a schema. It really is. That's its definition. Exactly that and nothing else.
It does not assume the schema definition language used to define the schema, though. Currently, the AP context points to a RDFS vocabulary defining the schema.
The $schema in JSON Schema is a link to a schema. The only difference to JSON-LD's context is that it imposes a specific schema definition language, and one that is fundamentally incompatible with the web.
-
Steve Batereplied to Nik | Klampfradler 🎸🚲 last edited by
-
Nik | Klampfradler 🎸🚲replied to Steve Bate last edited by
-
Nik | Klampfradler 🎸🚲replied to Nik | Klampfradler 🎸🚲 last edited by
Having plain JSON and a JSON Schema definition means there is one final schema definition, and all extensions would need to fork the schema into a new protocol. JSON Schema allows for extensions only by allowing unknown fields that are not defined by a schema.
We should not do that. It's a bad idea for a federated protocol.
-
Steve Batereplied to Nik | Klampfradler 🎸🚲 last edited by
-
Nik | Klampfradler 🎸🚲replied to Steve Bate last edited by
-
-
Evan Prodromoureplied to Evan Prodromou last edited by
-
Nik | Klampfradler 🎸🚲replied to Evan Prodromou last edited by
I can very well live with that.
I don't agree with "it will just work" because we see in the wild that it doesn't. And it can't, because two AP implementations can put identically named fields in their JSON with entirely different semantics, making two proprietary protocols that are incompatible.
A single implementation can ignore JSON-LD. Two interoperable implementations can't (if they don't happen tosupport the exact same content types).
-
Evan Prodromoureplied to Nik | Klampfradler 🎸🚲 last edited by
-
Nik | Klampfradler 🎸🚲replied to Evan Prodromou last edited by
It does work because everyone and their dog copies Mastodon's proprietary, underspecified extensions that very much **do not work** without reverse-engineering Mastodon.
What Mastodon does is the basis of the practically usable parts of the Fediverse, which is far from the basis being a well-defined, extensible protocol.
All of which is because people mistake JSON-LD for JSON.