-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
OrderedCollection with multiple items values. #507
Comments
so, one thing to keep in mind is that (as i understand it) JSON-LD doesn't allow you to have duplicate keys, only duplicate values, using an array syntax. So your example would actually look something like {
"@context": "https://www.w3.org/ns/activitystreams",
"summary": "Sally's notes",
"type": "OrderedCollection",
"totalItems": 2,
"orderedItems": [
[
{
"type": "Note",
"name": "Meeting 2016-11-17"
},
],
[
{
"type": "Note",
"name": "Reminder for Going-Away Party"
}
]
]
} So we can already see that there is going to be some conflict between ordered lists / multi properties. As I understand JSON-LD, the "ordering" of the list comes from the "orderedItems": {
"@id": "as:items",
"@type": "@id",
"@container": "@list"
}, The default container is "items": {
"@id": "as:items",
"@type": "@id"
}, So putting all of this together, I think the way to understand multiple items values is that giving a list of items is exactly the same as giving multiple definitions of items, and JSON-LD only supports the former. The |
Thanks for the explanation :) In an implementation strictly following the formal definition (which I'm trying to make), as I understand it, there is no way to define a unique ordering between the items of an instance of OrderedCollection in general. |
Yes, I think that's correct. As I found out when researching #508, Another thing to keep in mind is that |
Thanks for the clarification, that answers the question. |
Please Indicate One:
Please Describe the Issue:
The
as:items
property is not defined as a functional property, allowing users to define multiple values for this property. I can see how it is not a problem forCollection
, but it seems to me that it becomes one withOrderedCollection
. If there are multiples occurrences ofitems
for a single ordered collection, there are no ways to know how the items of the collection are actually ordered, right?Here is an illustration of the issue in a JSON-LD document:
How to interpret this? Is this supposed to be valid? Should the reader just give up in finding the order between the two items?
The text was updated successfully, but these errors were encountered: