Closed mih closed 3 months ago
Update: This problem only happens when converting to JSON-LD (with rdfpipe
) from an intermediate TTL export.
Leaving some hints:
When type
is defined as RDF:type
in the linkml schema, linkml-convert
to JSON-LD would still do something like:
{
"id": "thisdsver:.",
"type": "dlco:Distribution",
"conforms_to": "https://bids-specification.readthedocs.io/en/v1.4.0",
"has_part": [
{
"id": "thisdsver:./dummy.dat",
"type": "dlco:Distribution",
"format": "funky:3475"
}
],
"@type": "Distribution",
...
}
There is @type
only for the top-level object, otherwise just type
(sometimes in addition).
This converts back to YAML via linkml-convert
as
id: thisdsver:.
type: dlco:Distribution
conforms_to: https://bids-specification.readthedocs.io/en/v1.4.0
has_part:
- id: thisdsver:./dummy.dat
type: dlco:Distribution
format: funky:3475
If I change the JSON-LD export, and replace every type
with @type
, and remove the type
definition from the context -- I get a more "normal" JSON-LD document, which nevertheless converts back to an identical YAML form.
Framing the document like with
{
"@context": "...",
"@type": "https://concepts.datalad.org/ontology/Distribution",
"@id": "https://example.com/custom-namespace/datasetversion/."
}
to pick out the root distribution object works as expected.
I am closing this now. #125 brought a separation of type
and meta_type
, and #126 has some documentation on the underlying function.
It produces a JSON-LD serialization that looks like this:
The JSON-LD playground complains
It did not yet find a way to make this less than
The target is the syntax compliant