-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@type as @container:@set? #512
Comments
@gkellogg Any thoughts about this going into 1.1? I think the |
There is a provision in 3.3 of the Compaction Algorithm to make sure that values retain their array form if the container mapping includes
However, there is a missing paragraph in the Syntax document, which is present for other uses, for example:
We should add a similar paragraph for |
The question to me is that as |
I was confusing this issue with container on other properties. {
"@context": {"@type": {"@container": "@set"}}
} Then no, this has not been addressed yet. |
Yep, exactly that to ensure the consistency of the JSON representation for [Personally, I think best practice is to have exactly one type, and multiple instantiation is to be avoided like the plague ... but it's a feature of RDF that some systems do support] |
We did add |
Transfered to WG. |
The purpose of the
@container:@set
functionality (AFAIU) is to ensure that the output is consistent in shape. Thus if there can ever be multiple values, the structure is always an array.There are two situations in which this functionality could be desirable but is currently not possible:
@type
As it's a keyword, we can only alias it (e.g. astype
) but not define it to have@container:@set
functionality. Meaning that there's a gotcha waiting to happen for ontologies that require or use multiple classes for a single resource instance. See playground@context
Less useful, but@context
will also compact to a single string/object when there might be multiple contexts. See playground@context
modifying itself seems particularly strange, but the inconsistency for@type
seems solvable if the restrictions in its definition were loosened?The text was updated successfully, but these errors were encountered: