In the following example the trailing part of @id is computed from the data:
{
"@context": "http://vocab.example/0.1/",
"@type": "Foo",
"foo": "bar",
"@id": "https://host.example/ce157da859bbfba38d96ccaf080fa812/"
}
There is currently only one algorithm for computing this value so there is no sense in documenting the algorithm inside the data. However, in some future version this algorithm may change, so it would be beneficial for the context to express the algorithm that was used.
Unfortunately @id is a keyword with no associated behavior as a term, so it cannot be associated with an expressive @type such as, for the above example, CumputedUsingAlgorithmXYZ.
Ultimately I am looking for a way that will produce within the RDF for the above example probably something that means more or less this:
<https://host.example/ce157da859bbfba38d96ccaf080fa812/>
<https://host.example/ce157da859bbfba38d96ccaf080fa812/@>
"https://host.example/ce157da859bbfba38d96ccaf080fa812/"^^<http://vocab.example/0.1/CumputedUsingAlgorithmXYZ> .
Is there a way in json-ld to associate the value of @id with the additional type information, without adding to the data payload?
@id? Could you use a fragment to indicate the algorithm, or perhaps something in the path? That would be the usual solution to this.https://host.example/AlgorithmXYZ/ce157da859bbfba38d96ccaf080fa812/or similar? This is what common URI schemes already do, and it makes sense to put it in the identifier when it describes it.@idthen the algorithm would have been defined as its@type, not its@value, thus being defined just once in the context and not carried on millions of messages without adding any relevant information. In formats that specify the algorithms as part of the payload, such as certificates, HMACs, etc., this information is necessary because there are multiple other options as well, but this is not my use case.