-
Notifications
You must be signed in to change notification settings - Fork 23
what's the use of "@container": ["@id", "@set"] #140
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
Comments
@VladimirAlexiev The idea is to be able to force the shape of the resulting JSON. One of JSON-LD's most important uses is "annotating" vanilla JSON so that it can be understood in a semantic context. In this use case it's not always possible to decide to use an array or a single value-- that decision may have already been made. |
I recommend we have this sort of reasoning added to the feature descriptions in the spec (where possible). |
@ajs6f without such annotation, the jsonld processor will unpack the singleton arrays. In this case all the arrays are singletons by necessity, so what use it is to have that annotation? |
Note that |
@VladimirAlexiev Does that help answer the question? |
Closed by resolution: https://www.w3.org/2018/json-ld-wg/Meetings/Minutes/2019/2019-03-29-json-ld#resolution3 |
This issue was discussed in a meeting.
View the transcript4.3. @container [@id, @set]Rob Sanderson: Link: #140 Rob Sanderson: this issue questions the relevance of @container [@id, @set] … many people have answered, in the line of “it’s a feature, not a bug” Proposed resolution: Close #140 as a feature not a bug - no need to use it if you don’t want it, and gives consistency (Rob Sanderson) Rob Sanderson: +1 Gregg Kellogg: +1 Dave Longley: +1 Tim Cole: +1 David Newbury: +1 Gregg Kellogg: it is about consistency and orthogonality, despite the lack of use case Pierre-Antoine Champin: +1 Ruben Taelman: +1 Adam Soroka: +1 Ivan Herman: +1 Resolution #3: Close #140 as a feature not a bug - no need to use it if you don’t want it, and gives consistency David I. Lehn: +1 |
https://w3c.github.io/json-ld-syntax/#example-82-indexing-data-in-json-ld-by-node-identifiers-with-set-representation
Maybe I'm missing something but what use is
"@container": ["@id", "@set"]
?I think that with
@id
indexing, every@id
gets one JSON object.So
@set
will turn them all into singleton arrays: what is the use of that?The text was updated successfully, but these errors were encountered: