w3c / activitystreams

Activity Streams 2.0
https://www.w3.org/TR/activitystreams-core/
Other
278 stars 62 forks source link

OrderedCollection should use @list #502

Closed joepio closed 5 years ago

joepio commented 5 years ago

Please Indicate One:

Please Describe the Issue:

The OrderedCollection in the Vocabulary requires that orderedItems is serialized as a JSON Array. According to the JSON-LD spec, this will represent an Unordered RDF Collection.

This means that a spec compliant JSON-LD parser that parses an OrderedCollection will create an RDF Graph with Unordered Collections.

The JSON-LD spec requires that an @list key is used before the array:

{
  ...
  "@id": "http://example.org/people#joebob",
  "foaf:nick": {
    "@list": [ "joe", "bob", "jaybee" ]
  },
  ...
}
joepio commented 5 years ago

I think this comment explains why this is not a problem.

The magic happens in the activitystreams.jsonld file:

    "orderedItems": {
      "@id": "as:items",
      "@type": "@id",
      "@container": "@list"
    },

Sorry for opening this issue.