Expressing in json-ld the type of a value embedded within an id

49 views Asked by At

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?

0

There are 0 answers