Re: Pluralize plurals

2015-09-25 14:33 GMT+02:00 Ruben Verborgh <ruben.verborgh@ugent.be>:

> > As Markus explains in
> https://twitter.com/MarkusLanthaler/status/642229032650698752, some
> plural properties (having a JSON array data type) in Hydra are named in
> singular form (“operation” instead of “operations”, for instance) so they
> can be more easily mapped to Schema.org.
>
> How do you define a "plural property"?
>

A property whose data type is an array.


> > I’d like to suggest that this decision is wrong for two reasons.
>
> Wrong it cannot be; it's just a name.
> The logical reason here is that RDF property names are typically singular,
> because each value is part of a single triple.
>

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.


> The JSON-LD context can, however, have a mapping from the plural to the
> singular.
> But following the RDF model idea, the property name itself should be
> singular.
>

Perfect! let's do this by default in Hydra's JSON-LD definition, then? It
will of course bloat it a bit, but the JSON will be more intuitive because
of it, which is worth the bloat imho. If we don't do this, almost every
person seeing a Hydra based JSON document will ask themselves why the
property "operation" isn't plural. If we can avoid those questions
altogether without a significant cost, we should.

-- 
Asbjørn Ulsberg           -=|=-        asbjorn@ulsberg.no
«He's a loathsome offensive brute, yet I can't look away»

Received on Friday, 25 September 2015 13:04:26 UTC