The framing algorithm sometime keeps two occurrences of the resource with all attributes even if embed=LAST.
Json-LD input
{
"@context" : {
"@vocab" : "http://www.example.net/"
},
"@id": "#doc",
"@type": "Document",
"content": {
"@list": [
{
"@id": "#question",
"@type": "Question",
"label" : "Why am I here twice?"
},
{
"@id": "#block",
"predicate": {
"@id": "#question"
}
}
]
}
}
Frame:
{
"@context" : {
"@vocab" : "http://www.example.net/"
},
"@type" : "Document"
}
Cuttent buggy output:
{
"@context" : {
"@vocab" : "http://www.example.net/"
},
"@graph" : [ {
"@id" : "#doc",
"@type" : "Document",
"content" : {
"@list" : [ {
"@id" : "#question",
"@type" : "Question", //This attr should not be here, it is printed later
"label" : "Why am I here twice?" //This attr should not be here, it is printed later
}, {
"@id" : "#block",
"predicate" : {
"@id" : "#question",
"@type" : "Question",
"label" : "Why am I here twice?"
}
} ]
}
} ]
}
I will make PR with failing test case soon and link it here
Reactions are currently unavailable
The framing algorithm sometime keeps two occurrences of the resource with all attributes even if embed=LAST.
Json-LD input
{ "@context" : { "@vocab" : "http://www.example.net/" }, "@id": "#doc", "@type": "Document", "content": { "@list": [ { "@id": "#question", "@type": "Question", "label" : "Why am I here twice?" }, { "@id": "#block", "predicate": { "@id": "#question" } } ] } }Frame:
{ "@context" : { "@vocab" : "http://www.example.net/" }, "@type" : "Document" }Cuttent buggy output:
{ "@context" : { "@vocab" : "http://www.example.net/" }, "@graph" : [ { "@id" : "#doc", "@type" : "Document", "content" : { "@list" : [ { "@id" : "#question", "@type" : "Question", //This attr should not be here, it is printed later "label" : "Why am I here twice?" //This attr should not be here, it is printed later }, { "@id" : "#block", "predicate" : { "@id" : "#question", "@type" : "Question", "label" : "Why am I here twice?" } } ] } } ] }I will make PR with failing test case soon and link it here