-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON-LD 1.1 processing module. #122
Comments
I am not in favor of a java dependency I assume pyld is no longer maintained. There have been no commits to master in over a year. Is one option to make a fork and release on pypi under a different name? But it seems that another possibility is to use the json-ld support in rdflib6, but this will be difficult as a lot of the linkml ecosystem is pinned to rdflib5? And it's not clear to me if rdflib6 supports the features we need, such as framing? Another possibility is just to bypass json-ld altogether and do a direct conversion from objects to/from rdf? I think this will be simpler as we seem to keep running into jsonld context issues. I also see a few TODOs in the rdf_loader and it's not completely clear what the path is to fixing these |
Here is an example of how to convert directly from an rdflib Graph to instances of python linkml classes, without relying on jsonld, framing, or contexts - just using metadata about URIs in the schema: |
We should take a close look at rdflib 6. It may be that if we fix the string decode issue, we'll be good to go. There are a number of other really nice features that make it pretty appealing, and, if someone is actively working on the rdflib-jsonld (now built in) the shortest path may be to help them finish that or maybe even just wait until it gets done? |
Can we close this? |
yes. We use using rdflib for jsonld1.1 |
At the moment, we aren't certain about the state of PyLD. It appears to have at least some JSON-LD 1.1 processing in it, but it also isn't fully JSON-LD 1.1 compliant. In particular, see digitalbazaar/pyld#149 . We need to consult with the developers to determine where it sits and decide whether to:
The reason we need JSON-LD 1.1, by the way, is because LinkML slots are frequently context sensitive. As an example, in the following:
"name"
in the outer case might map tofoaf:name
and, in the inner case, perhapsfhir:Observation.code.coding
. JSON-LD only allows one map per JSON member key.The text was updated successfully, but these errors were encountered: