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
{{ message }}
Repository navigation
In conversion jsonld to rdf some data are missing. #232
The section on RDF serialization mentions well-formed IRIs, which relative IRIs without base are not. @giatrakister, passing a base IRI as JSON-LD option will probably work, as follows:
However, @ansell, it seems there is another bug in my case: the base IRI argument is ignored if it uses an exotic URI scheme, like tag:. The following also returns an empty graph:
[...] another bug in my case: the base IRI argument is ignored if it uses an exotic URI scheme, like tag:
I took a look at this and it seems the problem here is not the scheme itself, but the fact that the base IRI is opaque (not hierarchical), meaning the scheme-specific part does not start with a slash. With new JsonLdOptions("tag:/example/") I do get the expected output.
Activity
giatrakister commentedon Apr 20, 2018
I think that the jsonld is not correct. My starting point is a json file, are there any guidelines for json to jsonld convertion?
ansell commentedon Apr 27, 2018
Hi @giatrakister, those files are too large to investigate. Can you submit a smaller test file that shows where it may be breaking?
In terms of a json to jsonld conversion question, you could ask on the JSON-LD mailing lists for assistance.
vcharpenay commentedon Oct 4, 2018
I ran into the same problem and I noticed that only objects with
@iddefined as relative IRIs with no@basedisappear, as follows:The section on RDF serialization mentions well-formed IRIs, which relative IRIs without base are not. @giatrakister, passing a base IRI as JSON-LD option will probably work, as follows:
However, @ansell, it seems there is another bug in my case: the base IRI argument is ignored if it uses an exotic URI scheme, like
tag:. The following also returns an empty graph:fsteeg commentedon May 17, 2019
I took a look at this and it seems the problem here is not the scheme itself, but the fact that the base IRI is opaque (not hierarchical), meaning the scheme-specific part does not start with a slash. With
new JsonLdOptions("tag:/example/")I do get the expected output.And while that works, it seems the hierarchical part should actually start with two slashes, see https://w3c.github.io/json-ld-syntax/#base-iri, https://tools.ietf.org/html/rfc3986#section-5.1, https://tools.ietf.org/html/rfc3986#section-4.3, and https://tools.ietf.org/html/rfc3986#appendix-AEdit: I read the RFC wrong, see https://tools.ietf.org/html/rfc3986#section-5.1, which links to https://tools.ietf.org/html/rfc3986#section-4.3, where
hier-partis mentioned, which can have apath-rootless(see https://tools.ietf.org/html/rfc3986#appendix-A), which used to be called theopaque_part(see https://tools.ietf.org/html/rfc3986#appendix-D.2). So while the workaround described above works, not resolving correctly with the opaque base URI is actually a bug.Add tests for hierarchical and opaque base IRIs
Add tests for hierarchical and opaque base IRIs
Add tests for hierarchical and opaque base IRIs
Add tests for hierarchical and opaque base IRIs
Tweak IRI resolution according to RFC3986
Handle opaque base IRIs
Add `toRdf` tests for merging rootless base URL paths
Add `toRdf` tests for merging rootless base URL paths
Add test case for rootless base with trailing slash
Add `toRdf` tests for merging rootless base URL paths
Add test case for rootless base with trailing slash
Handle opaque/path-rootless base IRIs
Handle opaque/path-rootless base IRIs
fsteeg commentedon Jun 27, 2019
Fixed in master, closing. See #260.