You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Otherwise jsonld::jsonld_to_rdf will drop triples if the id is not a URI. Setting a @base to the document URL / document path is the standard behavior (e.g. in json-ld.org/playground, or python rdflib), see ropensci/jsonld#9.
Not obvious what this base should be. One option is the anonymous id "@base": "_:", which will replace the local ids with ids like JSON-LD does for anonymous objects (elements that didn't declare an @id), i.e. _:b0, _:b1, etc. This destroys the original string used as the id, which semantically shouldn't matter but is probably not nice all the same.
Other libraries just set the base to the file path, i.e. "@base": "some:url/or/local/path", which seems a bit arbitrary, particularly when it's exposing full user paths in the data somewhat surreptitiously. Maybe a default like "@base": "doc:" would be best.
The text was updated successfully, but these errors were encountered:
Otherwise
jsonld::jsonld_to_rdf
will drop triples if theid
is not a URI. Setting a@base
to the document URL / document path is the standard behavior (e.g. in json-ld.org/playground, or python rdflib), see ropensci/jsonld#9.Not obvious what this base should be. One option is the anonymous id
"@base": "_:"
, which will replace the local ids with ids like JSON-LD does for anonymous objects (elements that didn't declare an@id
), i.e._:b0
,_:b1
, etc. This destroys the original string used as the id, which semantically shouldn't matter but is probably not nice all the same.Other libraries just set the base to the file path, i.e.
"@base": "some:url/or/local/path"
, which seems a bit arbitrary, particularly when it's exposing full user paths in the data somewhat surreptitiously. Maybe a default like"@base": "doc:"
would be best.The text was updated successfully, but these errors were encountered: