Closed sebbader closed 3 months ago
Dear Sebastian, 1) I have just tried converting the JSON-LD serialization into Turtle (https://www.easyrdf.org/converter) and I got the expected result. 2) The uid field resorts to @id (you can see that in the context file https://www.w3.org/ns/odrl.jsonld)
Therefore, this is a expected result --whether desirable or not, can be discussed in https://github.com/w3c/odrl/issues/30
@vroddon I lost track of this issue due to some other things in the last months, so sorry for the late reply.
I have just tried converting the JSON-LD serialization into Turtle (https://www.easyrdf.org/converter) and I got the expected result.
True, but the mapping of the "uid" to the JSON-LD key "@id" is not common practice. I am not sure if it's wrong, though. But if you translate the Turtle back to JSON-LD, the "odrl:uid" property won't appear anymore. So a roundtrip JSON-LD -> Turtle -> JSON-LD will lead to a different content.
In that sense is my initial example not correct, I missed the "uid"->"@id" mapping in the Context. But the issue is still valid, I think.
Identifiers are a "built-in" in RDF, not in XML. I can't imagine any better form to transcode XML into RDF and vice-versa --this duality "uid/@id" is unavoidable, if we wan't to keep both RDF and XML. In any case, since we consider "uid" and "id" equivalent, there would be no "semantic" contradiction. Or did I miss an additional point?
Closed until this is reported to be a problem.
The best practices state that Example 1 (JSON-LD) and Example 2 (turtle) are equivalent. I am wondering if I might miss something but if I translate the JSON-LD, my output looks different mainly on the subject position and the
odrl:uid
property.Example 1:
Which I would translate to (please note the blank node at the root and the strings at the object positions):
but the Example 2 actually says (with a few adjustments to differing URIs):
Which in my view outlines the following issues:
"@id": "http://example.com/policy:1010"
instead of"uid": "http://example.com/policy:1010"
in the JSON-LD.<#> odrl:action odrl:use .
in Turtle needs a JSON-LD representation like"action": {"@id": "use"}
As I personally think that the Turtle representation of Example 2 is the right way (whatever right means), this brings me to two questions:
odrl:uid
mandatory? Isn't the intention rather to always have "@id" set in JSON-LD and thereby preventing blank nodes on the level of policies? If so, the constraint in the recommendation (section 2.1) needs to be formulated differently...Appreciate your feedback!