in other news i an mulling over a profile of jsonld/as2 that adds further restrictions and loosens others in order to make the “plain json” more amenable to extensibility without everyone doing it wrong.
-
in other news i an mulling over a profile of jsonld/as2 that adds further restrictions and loosens others in order to make the “plain json” more amenable to extensibility without everyone doing it wrong. this is in follow-up to the “fixed as2/masto context” i jotted down in https://gist.github.com/trwnh/d2f6fb1c87465baab8231427013a36a8
i’m thinking “compacted but against an empty context and with compactArrays = false” would be sufficient to significantly reduce common points of confusion. this has the effect of ensuring consistency
-
trwnh@mastodon.socialreplied to trwnh@mastodon.social last edited by
i’ve said before that the jsonld context is a wonderful tool for indirection but forcing people to be consistent with it is forcing people to be as indirect as you tell them to. it’s much better to be unambiguous and explicit upfront about the reality of the data structures you’re working with. none of the pain of having to manage term lookup or namespacing. just use full uris everywhere. specify if your node is an id or a value. everything is an array, just some arrays have only 1 item.
-
trwnh@mastodon.socialreplied to trwnh@mastodon.social last edited by
the as2 profile would be something like "compact ONLY against the as2 context" which at least forces extensions to not have to be expanded. i'm less sure about this because if any extension terms get added to the as2 context later then it makes old documents noncompliant. also it only somewhat solves the issue because the as2 context is itself partially wrong.
-
trwnh@mastodon.socialreplied to trwnh@mastodon.social last edited by
basically the whole idea of "you can treat it as plain json" falls apart because producers have to be wrong in exactly the same way as2 is wrong, and consumers have to deal with combinatorial explosion of possible representations which are all equivalent and valid.
it's not just busted at the jsonld level, it's also plain bad json. the only reason anything works in fedi is that we all do it wrong in the same way. it creates a mess for anyone trying to make sense of it from the outside, though!