Elektrine lite

← Feed

@Johann150@genau.qwertqwefsday.eu

Post #3657671

2026-05-03 20:57 UTC

@trwnh@mastodon.social i fear you've probably answered this question before (maybe i even asked it before) but wouldn't most if not all of json-ld also be possible to represent with XML? trying to find comparisons between JSON-LD and XML only leads me to (plain) JSON vs. XML comparisons.

Replies (1)

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

    @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

    Open ##3657673