Duplicate property in JSON-LD framing

Hello,

This question is probably trivial to you, but I wonder whether it is 
possible to force the same triple to be framed with two different 
properties in JSON-LD 1.1 .

For example, I have this input document with "title"(english) and 
"titles" as a language map:

{"@context":
{"dct":"http://purl.org/",
"title":{
"@id":"dct:title"
},
"titles":{
"@id":"dct:title",
"@container":"@language"
},
"@language":"en"
},
"@id":"http://toto",
"@type":"dct:toto",
"title":"pouet",
"titles":{
"fr":"loutre"
}
}

I use this very simple frame :

{"@context":
{"dct":"http://purl.org/",
"title":{
"@id":"dct:title"
},
"titles":{
"@id":"dct:title",
"@container":"@language"
},
"@language":"en"
},
"@type":"dct:toto"
}


And I obtain this output JSON, which is logical because we have two "dct:title" each with a language tag so "titles" plural is used for both.
However, I would like to also have the "title" property to appear in order to keep the same structure as before.
{
"@context":{
"dct":"http://purl.org/",
"title":{
"@id":"dct:title",
},
"titles":{
"@id":"dct:title",
"@container":"@language"
}
},
"@id":"http://toto",
"@type":"dct:toto",
"titles":{
"en":"pouet",
"fr":"loutre"
}
}


What I would like to obtain:
{
"@context":{
"dct":"http://purl.org/",
"title":{
"@id":"dct:title",
},
"titles":{
"@id":"dct:title",
"@container":"@language"
}
},
"@id":"http://toto",
"@type":"dct:toto",
"titles":{
"en":"pouet",
"fr":"loutre"
}, "title": "pouet"
  }


Do you know if there is any way to specify this in the frame or in the context ?

Thanks for your help,
Elodie

Received on Thursday, 10 June 2021 09:57:56 UTC