Re: Pluralize plurals

On 2015-09-25 15:03, Asbjørn Ulsberg wrote:
> 2015-09-25 14:33 GMT+02:00 Ruben Verborgh <ruben.verborgh@ugent.be
> <mailto:ruben.verborgh@ugent.be>>:
>
> That's fine. I don't want to break that compatibility.
>
>     I.e., if Alice has friends Bob, Charly, and Dean, then this is
>         :alice :hasFriend :Bob.
>         :alice :hasFriend : Charly.
>         :alice :hasFriend : Dean.
>
>
> This is also fine. But this is on an abstract, RDF level. I want it to
> also make sense in the bits and bytes that produce the sensible JSON
> most people will understand. The RDF part of JSON-LD is not something
> that most people having (or wanting) to deal with it will even know the
> first thing about what is or how works. It's mostly just very convenient
> that we finally have a format for expressing relations that doesn't need
> a scientist to understand.
>

I don't agree. JSON-LD naturally stems from the JavaScript land, where 
JSON also originated. JavaScript is often used in a way where a given 
parameter accepts either a single element or an array. In such cases I 
would expect a singular form. For example in knockout validation it is 
possible to supply a single custom validator or an array [1]. . Plural 
would mean that an array is always expected, which is not true.

To back it up, consider a JSON-LD document, where a property is defined 
as "@container": "@set" (or list). Both a single element or JSON array 
produce equal expanded JSON-LD and triples. See playground examples [2] 
and [3]. Thus I think that it isn't necessary to do what you propose and 
may arguably be less confusing than you fear.

Just my two cents.

Regards,
Tom

[1]: https://github.com/Knockout-Contrib/Knockout-Validation
[2]: http://tinyurl.com/ndhoq5t
[3]: http://tinyurl.com/nj2b2rl

Received on Friday, 25 September 2015 19:24:39 UTC