Skip to content

JSON LD 1.1 prefix handling needs enhancement #714

Open
@hsolbrig

Description

@hsolbrig

The OBO and prefixcommons communities have been maintaining prefix libraries as JSON-LD contexts. Many of the URI's in these libraries do not end with the standard set of terminators, the most common being '_'. These libraries (example: https://github.com/prefixcommons/biocontext/blob/master/registry/monarch_context.jsonld) serve several purposes:

  1. As a mechanism to map prefixes in JSON to URI's via a JSON-LD processor.
  2. As a formal database of maps that are accessed using plain JSON
  3. As human-readable documentation

Note: Ignore the empty prefix in the front of these files -- they can, and probably should, be removed.

The current JSON-LD 1.1 specification requires the various context documents in these libraries to be changed from:
"BFO": "http://purl.obolibrary.org/obo/BFO_",
to
BFO": {"@id": "http://purl.obolibrary.org/obo/BFO_", "@prefix": true},

This, however, breaks both 2) and 3) above and would require extensive, non-backward compatible edits.

There have been discussions about solutions on w3c/json-ld-syntax#329, but it was decided that the solution to this issue would be postponed.

As a short term solution to this issue, we have tested a fork of the python rdflib-json-ld where pass a "prefix" parameter to the API that instructs the processor to treat everything it sees as a prefix.

@davidlehn has indicated that he would be open to incorporating a change of this nature into the javascript JSON-LD implementation and, if we can get something similar into the Java library that the OBO community is using, we should be able to "limp by" and maybe even have a vetted proposal ready to go assuming the W3C adopts the upcoming (ref?) incremental specification proposal

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions