Elektrine lite

← Feed

@trwnh@mastodon.social

Post #3657673

2026-05-03 21:03 UTC

@Johann150@genau.qwertqwefsday.eu jsonld is a bit like xml namespaces but extended -- it tells you when strings are actually ids, it lets you use non-prefixed terms, it lets you do transformations of a sort so a term definition like this "foo": { "@\id": "https://foo.example/", "@\type": "@\id" } means you can do this in the doc "foo": "bar" and you know "bar" is an id and not just a string. and you know "foo" is specifically foo.example. xmlns iirc only let you do x:foo or set a default ns for all subnodes

Replies (1)

  • @trwnh@mastodon.social 2026-05-03 21:06

    @Johann150@genau.qwertqwefsday.eu in xml you would have element foo="bar" and it would be a bit awkward if "element" and "foo" came from different namespaces. also you wouldn't know right away that "bar" was a resource/thing/id. the rdf/xml syntax uses about= and resource= for this kind of "the value is a reference id" disambiguation, but i wouldn't wish rdf/xml as a serialization on anyone. it's been decades since most people moved on to turtle which is easier because it's plain text

    Open ##3657674