json-ld / json-ld.org

JSON for Linked Data's documentation and playground site
https://json-ld.org/
Other
852 stars 151 forks source link

"@container": "@sequence"? #837

Open ebremer opened 3 months ago

ebremer commented 3 months ago

Is there a "@container": "@sequence" to map an array to rdf:Seq?

gkellogg commented 3 months ago

In the early days, we discussed different kinds of containers (at the time the Ordered List Ontology), but nothing emerged. The feeling about rdf:Seq (and rdf:Bag) is that they are a bit archaic and there was no demonstrated use case for them, and introducing the rdf:nnn properties into JSON-LD at least for the RDF serialization parts wasn't too attractive.

RDF-star could provide another way of ordering relationships by annotating specific triples. That hasn't emerged as a use case, though, IIRC.

ebremer commented 3 months ago

Just curious. I've seen rdf:Seq used in image metadata in the Adobe XMP (700) tiff tag in NASA imagery and pathology whole slide imaging. Triple-wise, rdf:Seq is a bit less verbose than rdf:List, but yeah, at the cost of adding rdf:nnn to the mix. Personally, I would be happy if rdf:first cardinality is 0 or 1 with support for it in all the pertinent places and accepted as "well-formed" .... :-)

Should the "archaic" features be officially deprecated in 1.2?

gkellogg commented 3 months ago

As you note, rdf:Seq is used in XMP and other areas that go back to the RDF/XML RDF 1.0 era. I don't think we'll see them removed before a hypothetical RDF 2.0 release, which I doubt will ever happen. What to do with 1.0 reification (rdf:Statement) is another question, as it will overlap the RDF-star reification direction. But, there hasn't been much appetite to touch RDF/XML so far.