Closed MarcusElevait closed 1 year ago
Can you provide minimal sample input and context? Easiest way to debug this is to just put that in the playground and fiddle until it works.
Okay so here are the three quads, that are the input for this list:
{
"termType": "Quad",
"subject": {
"termType": "BlankNode",
"value": "_:n3-4"
},
"predicate": {
"termType": "NamedNode",
"value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#first"
},
"object": {
"termType": "NamedNode",
"value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
},
"graph": {
"termType": "DefaultGraph",
"value": ""
}
},
{
"termType": "Quad",
"subject": {
"termType": "BlankNode",
"value": "_:n3-4"
},
"predicate": {
"termType": "NamedNode",
"value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"
},
"object": {
"termType": "NamedNode",
"value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"
},
"graph": {
"termType": "DefaultGraph",
"value": ""
}
},
{
"termType": "Quad",
"subject": {
"termType": "NamedNode",
"value": "http://example.com/ns#PersonShape"
},
"predicate": {
"termType": "NamedNode",
"value": "http://www.w3.org/ns/shacl#ignoredProperties"
},
"object": {
"termType": "BlankNode",
"value": "_:n3-4"
},
"graph": {
"termType": "DefaultGraph",
"value": ""
}
}
and the context is this (as i wrote in my original post):
{
'@id': 'http://www.w3.org/ns/shacl#ignoredProperties',
'@type': '@id',
'@container': '@set',
}
Sorry this was my bad, i was confused by the concept of sets and lists in shacl. so i will close this here.
We have a simple turtle string:
and the related context
as the order of the ignored properties is not relevant, we want to use a set here. However, after compacting it, we get the following:
Whereas when we change the @container to @list we get the correct representation:
I thought that both, @set and @list should be a simple json array after compacting. Is this intentional?