Using document location as vocabulary base

Kingsley, during the JSON-LD call today we specifically wanted to solicit your feedback on if our proposed fix in PR #603 [1] satisfies your requirements as stated in issue #488 [2].

A particular use case is highlighted in the syntax document:

{
  "@context": {
    "@base": "http://example/document",
    "@vocab": ""
  },
  "@id": "http://example.org/places#BrewEats",
  "@type": "#Restaurant",
  "#name": "Brew Eats"
  …
}

The “@vocab”: “” has the effect of using the current document base (either location, or set via @base) to create property IRIs. This would expand to the following:

[{
  "@id": "http://example.org/places#BrewEats",
  "@type": ["http://example/document#Restaurant"],
  "http://example/document#name": [{"@value": "Brew Eats"}]
}]

You can find formatted versions of the syntax [3] and API [4] documents. Kindly respond to indicate if the proposed text satisfies your requirements.

Gregg Kellogg
gregg@greggkellogg.net

[1] https://github.com/json-ld/json-ld.org/pull/603
[2] https://github.com/json-ld/json-ld.org/issues/488#issuecomment-361587510
[3] https://rawgit.com/json-ld/json-ld.org/vocab-base/spec/latest/json-ld/index.html#using-the-document-base-as-the-default-vocabulary
[4] https://rawgit.com/json-ld/json-ld.org/vocab-base/spec/latest/json-ld-api/index.html

Received on Tuesday, 13 March 2018 01:20:48 UTC