-
Notifications
You must be signed in to change notification settings - Fork 160
Closed
Labels
Milestone
Description
Currently @ids are transformed to absolute IRIs during expansion. It might make sense to re-compact them automatically to relative IRIs in compaction.
Example (assuming http://www.example.com/document.jsonld as base IRI):
{
"@context": {
"name": "http://xmlns.com/foaf/0.1/name"
},
"@id": "markus",
"name": "Markus Lanthaler"
}
Expands to
[
{
"@id": "http://www.example.com/markus",
"http://xmlns.com/foaf/0.1/name": [
{ "@value": "Markus Lanthaler" }
]
}
]
and re-compacts to
{
"@context": {
"name": "http://xmlns.com/foaf/0.1/name"
},
"@id": "http://www.example.com/markus",
"name": "Markus Lanthaler"
}
Instead I think it should compact to
{
"@context": {
"name": "http://xmlns.com/foaf/0.1/name"
},
"@id": "markus",
"name": "Markus Lanthaler"
}