Closed azaroth42 closed 6 years ago
I don't really see this, given that it's a list, an array seems to be implied to me. I'd hate to add another keyword, too. All this to make compaction less normalized. As you note, it's legal input.
Expanding the discussion to include the parsing side than just the serialization, if the intent is that the predicate should take either a string or an rdf:List as the range and the parser should respect that internally.
Discussion on 2018-05-07 call:
Closed in favor of https://github.com/w3c/json-ld-syntax/issues/17.
We should consider whether or not the opposite of
@container:@set
is sufficiently valuable to include. This would be when there is exactly one entry in an@list
, instead of compacting to an array, compact to a single item.It is valid as input already (http://tinyurl.com/yccbfl9j) but compaction will always create the JSON array.
The context might say:
For example, the schema.org
recipeInstructions
for a single step could just be a string, not an array containing a string. Such as this very simple guacamole https://www.allrecipes.com/recipe/14231/guacamole/ could be compacted to:even if
recipeInstructions
was an@list
.(/ht @danbri)