aggressive re-embedding
Also just tried Markus' version of playground and it works http://www.markus-lanthaler.com/jsonld/playground/
.... Just found that this is discussed in https://github.com/json-ld/json-ld.org/issues/119 So it is addressed?
..... If I've an object that will be referenced by multiple places, seems that only the 1st reference will be embedded and the rest wont be...
Here is my examples that I tried out in the playground... ID_0 object has two objects. ID_1 and ID_2.
Then both ID_1 and ID_2, will have one field shared, ID_SHARE_1... Then, if I've a frame as
---> Frame
{
"@context": {"C" : "http://c" },
"@type": "http://root",
"C:has_items" : {}
}
--> framed output... Shouldn't ID_SHARE_1 object should be embedded in both ID_1 and ID_2 objects???
{
"@context": {
"C": "http://c"
},
"@graph": [
{
"@id": "http://ID_0",
"@type": "http://root",
"C:has_items": [
{
"@id": "http://ID_1",
"C:has_shared_item": {
"@id": "http://ID_SHARE_1",
"C:hasName": "I'm shared"
}
},
{
"@id": "http://ID_2",
"C:has_shared_item": {
"@id": "http://ID_SHARE_1"
}
}]
}]
}
---->> Raw Input
{
"@context": {"C" : "http://c" },
"@graph": [
{
"@id" : "http://ID_SHARE_1",
"C:hasName": "I'm shared"
},
{
"@id": "http://ID_1",
"C:has_shared_item" :
{
"@id": "http://ID_SHARE_1"
}
},
{
"@id": "http://ID_2",
"C:has_shared_item" :
{
"@id": "http://ID_SHARE_1"
}
},
{
"@id": "http://ID_0",
"@type": "http://root",
"C:has_items": [
{"@id": "http://ID_1"},
{"@id": "http://ID_2"}
]
}
]
}
Dave - Will there be any chance that this will be added?
Sorry for the slow response! Yes, I expect it to be added, we just don't have a timeline yet. The library is currently being updated to pass more of the JSON-LD test suite.
This has been implemented now with framing embed options of: '@last', '@always', '@never', and '@link'. More details can be found here: https://github.com/json-ld/json-ld.org/issues/377